Skip to content

v2.3.0

Choose a tag to compare

@github-actions github-actions released this 25 Sep 23:42
· 2 commits to main since this release
546683d

Unreadable files no longer pass as clean

A file the grammar could not read produced no functions and no issues, so it scored close to a perfect A and counted as a clean file in the grade distribution. A Go file that was 85.6% unparsed scored A (99).

  • A file with more than 20% of its bytes unparsed is now unanalyzed: it gets no score and is left out of the weighted average and the grade distribution. The summary counts these files, and -v shows what share of each one was unparsed. (#4)
  • --fail-on-unanalyzed makes the run exit 1 when any file is unanalyzed, so CI can refuse code the tool could not read. It is off by default. (#5)

Almide: current syntax parses

tree-sitter-almide is now at v0.3.0 (was v0.1.0). It reads the Almide being written today:

  • types: T?, module-qualified types, -> T! / -> T!E
  • expressions: fan { a, b } and the fan.* heads
  • strings: escaped quotes and // inside them

Before this, 18 of 39 files across three real Almide projects came back unanalyzed. All 39 are read now. (#9)

Go 1.27

  • Generic methods parse, through a tree-sitter-go fork pinned until the upstream change lands (#8 tracks going back to crates.io). (#6)
  • New rule go-generic-method: when go.mod declares a version below 1.27, generic methods are reported, as go vet's stdversion check would. (#7)

Fixes

  • max-depth counted every else if as one level deeper. A long else-if chain reported "nesting depth 5" where the code nests once. An else if now stays at the depth of the if it continues, as ESLint's max-depth counts it. This affects every language with else-if chains. On one Almide project, warnings went from 85 to 15, and all 15 that remain are real. (#9)
  • Almide else if chains stay flat in cognitive complexity, as JS, Rust and Lean chains already did. (#9)
  • unused-import ignored uses in TypeScript type positions, so an import used only as a type was reported unused. On one app, 82 of 83 reports were this false positive. (5626620)

This changes reported numbers. Scores go down where unreadable files used to pass as clean. They go up where long else-if chains were reported as deep nesting. A baseline recorded with 2.2.0 will show both kinds of change.