Skip to content

Analysis release 2.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Oct 08:35
· 65 commits to main since this release

Added 馃殌

  • One-step analysis: ccsh analyse maps a codebase with every parser that applies to it and its git or svn
    history into one map, without any configuration.

  • Quality gate (experimental): ccsh gate checks a project against the metric limits and dependency rules
    in its .codecharta.yml, which can accept single known cycles and upward dependencies, and reports every broken
    rule on the console, as JSON and through an exit code you choose.

  • Switching off comments or strings: domainlanguageparser accepts a comment or string weight of 0 to leave those
    words out.

  • Angular templates: unifiedparser, domainlanguageparser and dependencyparser measure Angular templates, in
    .html files and inline, and link them to the components and pipes they use.

  • SQL: unifiedparser, dependencyparser and domainlanguageparser read .sql, .pks, .pkb and .pls files
    of ANSI SQL, T-SQL, PL/SQL, PL/pgSQL and MySQL without being told the dialect.

  • SQL object counts: unifiedparser shows for each SQL file how many stored procedures, triggers, views and
    tables it creates.

Changed

  • Java 22 or newer (breaking): ccsh no longer runs on Java 17 or 21 and says which Java it needs when started
    on one; the Docker image already ships a newer Java.

  • Faster unifiedparser: the metrics of a code base are calculated many times faster, with unchanged results.

  • Faster domainlanguageparser: the words of a code base are extracted several times faster.

  • Faster dependencyparser: a run takes a fraction of the time on most code bases, most of all on PHP; where
    cycle detection and levelling dominate, as on very large graphs, the gain is smaller.

Fixed 馃悶

  • Strings of exported code: domainlanguageparser reads the strings of exported JavaScript and TypeScript code.

  • Files a parser cannot analyse: unifiedparser, dependencyparser and domainlanguageparser skip a file they
    cannot analyse with a warning that names the cause, and end with an error instead of an empty map when no file could
    be analysed at all.

  • Kotlin dependencies: dependencyparser finds the Kotlin dependencies it missed, such as casts and type checks,
    caught exceptions, type bounds, lambda and function types, class literals, objects used as values, aliased imports,
    fully qualified names, delegated interfaces and fun interfaces; an inner class depends on the class around it.

  • Kotlin top-level declarations: top-level functions, properties and typealiases are leaves of their own in
    dependencyparser, and a Kotlin file without any declaration keeps its node.

  • Fully qualified names: dependencyparser resolves a type written with its full package to that type, also when
    a type of the same name is imported.

  • Kotlin functions: unifiedparser counts every Kotlin function with a body, whatever its signature holds, and no
    longer counts a lambda as a function.

  • Kotlin secondary constructors: unifiedparser measures the body of a secondary constructor in the per-function
    metrics.

  • Nested functions: the per-function metrics of unifiedparser give a nested function an entry of its own.

  • Expression bodies: unifiedparser counts the line of a function whose expression body is a single value, and of
    a C# expression-bodied method, in the per-function lines of code.

  • Umlauts in comments and strings: domainlanguageparser keeps words with umlauts and 脽 whole in comments and
    strings, and an escape sequence in a string separates words.

  • Non-ASCII file names: a file whose name holds non-ASCII characters is analysed also when the system locale is not
    UTF-8.

  • Crash while showing progress: a parser no longer aborts now and then with an error from its progress bar.

  • Form feeds in source files: a file that contains a form feed or a vertical tab no longer gets wrong function
    and complexity counts from unifiedparser, nor wrong words from domainlanguageparser.

  • Rare characters in source files: domainlanguageparser no longer returns cut-off words for a file that
    contains a byte order mark after its first character or one of the characters U+FFFE and U+FFFF.

  • Upward edges into nested classes: dependencyparser marks a dependency between a class and a class nested
    in it as pointing upwards only when the two form a cycle, and then only the one from the nested class back.

  • Rare characters in dependencyparser: a file that contains one of the characters U+FFFE and U+FFFF no longer
    loses the dependencies of the code behind it.

  • Python files with a syntax error: dependencyparser no longer leaves a Python file out because one of its
    classes or functions does not parse.

  • Deeply nested code: dependencyparser no longer aborts on a Java, Kotlin, C#, C, C++, JavaScript, TypeScript,
    Delphi or Rust file with a very long chained expression, such as thousands of concatenated strings.

  • Objective-C methods without a selector name: domainlanguageparser no longer skips a file that declares a
    method such as - (void):(int)amount.

  • Start folder on Windows: ccsh no longer loads code from the folder it is started in, so analysing a
    project from inside its folder cannot run files that project brings along.