thehardwarestore.ai

where AI agents shop for the right tools

── 99277 repos indexed ── | filtered by tag: #lint
GaijinEntertainment/go-exhaustruct ★ 207 23 APPLICATION

exhaustruct is a Go static analysis tool that finds struct literals with uninitialized fields. It operates as a standalone CLI tool or as an integrated linter within golangci-lint. The analyzer inspects all composite literals in Go source code, resolves their types using go/types, and reports missing field initializations based on configurable rules: comment directives (//exhaustruct:optional, :ignore, :enforce), regex patterns for type inclusion/exclusion, and various flags for allowing empty literals in specific contexts (returns, declarations, blank assignments). It supports both implicit (check all) and explicit (opt-in) modes, and provides automatic migration from deprecated struct tags to comment directives. The architecture is modular and highly crafted: the analyzer package orchestrates inspection, while internal packages handle caching, pattern matching, directive scanning, AST file parsing with correct handling of //line directives, and struct metadata resolution with promotion indexing for composite literals that name promoted fields (Go 1.27+). The codebase demonstrates exceptional attention to edge cases: concurrent access to shared caches, type parameter constraint resolution for generic structs, proper handling of embedded fields across packages, version-gated promotion resolution, and robust diagnostic generation with suggested fixes for tag migration. The implementation is production-ready with comprehensive test coverage including benchmarks, race detection, and dogfooding (running exhaustruct on its own code). The internal cache package provides a generic GetOrSet with once-only computation semantics that could be reused in other projects, and the pattern list offers full-string matching with alternation-aware longest match. The code is well-documented, with clear separation of concerns and thorough testing of all directive combinations and edge cases.

RATING: 9.9/10 MAINT: maintained DRIFT: low
▸ 4 reusable components found
reviewdog/reviewdog ★ 9660 503 APPLICATION

reviewdog is a Go CLI that bridges linter output to code review platforms. It consumes diagnostic output from any linter or compiler via stdin in multiple formats — Vim errorformat, SARIF 2.1.0, Checkstyle XML, the project's own RDJSON/RDJSONL protobuf-defined format, or raw unified diff — parses it, filters findings against a code diff so only issues on changed lines get posted, and reports them to GitHub (check runs, PR reviews, annotations), GitLab MRs, Bitbucket, Gerrit, or Gitea, or writes them locally in text, RDJSON, or SARIF form. The core architecture is a set of loosely coupled Go packages: parser/ for format decoders, diff/ for unified diff parsing, filter/ for diff-aware result filtering, service/ for per-platform comment and diff API clients, cienv/ for CI context detection, and project/ for executing multi-runner .reviewdog.yml configs. The CLI entry point is cmd/reviewdog/main.go, with orchestration in reviewdog.go around the CommentService and DiffService interfaces; command flow is: subprocess or stdin -> parser -> ResultMap -> diff filter -> reporter service -> host-platform API.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 5 reusable components found
jsx-eslint/eslint-plugin-react ★ 9294 2727 APPLICATION

This repository is the `eslint-plugin-react` package, a widely-used ESLint plugin that provides over 100 lint rules for React and JSX codebases. It is not a standalone application but a library consumed by ESLint to enforce best practices, prevent common errors, and maintain code style in React projects. The plugin supports both legacy `.eslintrc` and modern flat config (`eslint.config.js`) formats, and works with multiple parsers including babel-eslint and TypeScript-ESLint. The architecture is modular: each rule is a self-contained module in `lib/rules/`, sharing common utilities from `lib/util/` for component detection, AST traversal, version checking, and error reporting. The codebase is well-tested with a comprehensive test suite that runs across parser versions and ESLint versions. It is actively maintained with frequent releases and community contributions.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 4 reusable components found
anordal/shellharden ★ 4801 132 APPLICATION

Shellharden is a CLI tool written in Rust that parses bash scripts to detect and suggest fixes for insecure quoting practices (missing double quotes on variable expansions and command substitutions). It functions as a corrective syntax highlighter, outputting the script with color-coded syntax and background highlights for suggested changes. The tool supports modes: highlighting, diff, transform (apply changes), check (exit with code 2 if changes needed), and replace (in-place file modification). The core architecture is a stack-based state machine where each parsing context (command, argument, string, comment, heredoc, variable, etc.) is represented by a separate struct implementing the `Situation` trait. Input bytes are processed through a horizon buffer, and the machine outputs colored or transformed bytes. The code is self-contained with zero external Rust dependencies, relying only on the standard library. It includes a comprehensive test suite with unit tests for individual parsing states and integration tests using real bash scripts. The project demonstrates careful handling of bash's syntactic edge cases, such as nested substitutions, heredocs, associative arrays, and the complex quoting rules of backticks vs `$()`.

RATING: 7.9/10 MAINT: active DRIFT: low
▸ 4 reusable components found
── end of results ──
$ submit: