Repository navigation
refactor: no comment in any file, and a gate that refuses one - #91
Merged
Merged
Conversation
… fails, and name the first-download test - Remove `elo-doctest`. The comment gate refuses each `///` and each `#[doc = ...]`, so no doctest can be written and the gate cannot fail. - In `elo-comments`, `wait $!` gets the status of `find`, and the gate stops on an empty file list. Without the files, `ast-grep scan` scans `.` with the ignore files and does not scan hidden files. - `headerssync.rs`: `first_download` names the work test, as the removed comment did. - CI: the gate matrix is a block list, at less than 100 columns.
- One list, `commentGlobs`, gives the files of each language. It is the `languageGlobs` of the ast-grep config, and it is the set of files that the gate takes. - `commentFree` names the files that the gate takes with no scan: the two `Cargo.lock`, `flake.lock`, `README.md` and the fuzz corpus. Each `Cargo.lock` has the two comment lines that cargo writes. - The gate stops on each other file, such as a `.py` or a `Dockerfile`. Before, ast-grep skipped such a file and the gate passed. - The gate tests its file check first, on a list of paths.
…ads the keys - `Salt::new` makes a salt. No other module reads or copies its fields. - `net::salt_words` reads the random words. `each_salt_word_is_new` tests them, and `salt` gives them to `Salt::new`. - The fuzz model reads `SCRIPT_KEYS` and `SCRIPT_OFFSET`, the values of its own salt.
lorenzolfm
force-pushed
the
no-comments
branch
from
November 14, 2026 15:56
98d6d37 to
7118ef2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
//,///,//!and/* */, Nix#, bash infuzz/session.sh, in Nix''strings and inrun:steps, YAML, TOML,.envrcand.gitignore. The removal is from the ast-grep match ranges, so a#or//in a string stays.elo-comments. It runs the ast-grep rule tests, then scans each file of the flake source. CI runs it in the gate matrix..config/ast-grep/comments(scaffold#106), only for the languages elo has: Rust, Rust#[doc = ...], Nix, Nix strings, bash, YAML, YAMLrun:, TOML. The config is the one of scaffoldnix/dev/commands/lint.nix, with only the TOML grammar.headerssync.rs: one nestedifis now oneifwith&&. The comment between the two had stopped clippycollapsible_if. The namefirst_downloadkeeps the meaning of the removed comment.elo-doctest.findfails or gives no file.commentGlobslists the files of each language, andcommentFreelists the files that need no scan.Salthas private fields andSalt::new. Onlyheaderssyncreads the keys.Why
A gate, not
dev lint. elo has nodevcommand. Each check of elo is a flake gate, so this check is a gate too.The scan reads the flake source, not
git ls-files. A flake source is the tracked files, so the result is the same.findgives hidden files, so.github,.cargo,.config,.envrcand.gitignoreget a scan.Dropped from scaffold. The ignores of
database/src/schema.rsandsrc/doctests.rs, and the rules for awk, proto and SQL. elo has none of those files.Lost text. No text moves to another place. Git history keeps it. This includes the provenance of the captured bytes in
src/fixtures.rs, the version tags after the pinned action SHAs, and the usage text ofsession.sh.elo-doctestis removed. The comment gate refuses each///and each#[doc = ...], and a doctest is one of those. Thus the gate cannot fail. A later doctest PR adds the gate again, with the scaffold ignore ofsrc/doctests.rs.The gate stops when
findfails. A process substitution hides the status offind, sowait $!gets it. An empty list stops the gate too:ast-grep scanwith no path scans.with the ignore files, and does not scan the hidden files.The gate refuses a file that no rule reads. Before, ast-grep skipped a
.py,.mdorDockerfilewith a comment, and the gate passed. Now one Nix list gives thelanguageGlobsand the files that the gate takes, so the two cannot become different.README.md, the twoCargo.lock,flake.lockand the fuzz corpus are oncommentFreeby name. EachCargo.lockhas the two comment lines that cargo writes.Saltfields are private. A removed comment said that no other sync can read the salt. Only that comment held this. Now the type holds it. The fuzz model reads its ownSCRIPT_KEYSandSCRIPT_OFFSET, andeach_salt_word_is_newreadsnet::salt_words.Not confident:
.rs,.toml,.sh,.yaml,.envrcand.gitignorefile, a nestedfuzz/.gitignore, and a planted.pywith no comment.