Repository navigation
fix(analysis): name the cause in the error of a run that analysed no file - #4596
Conversation
Build tree-sitter-angular 0.9.2 for Linux and macOS on x86_64 and aarch64 and Windows on x86_64 with the gen and buildNative tasks of bonede/tree-sitter-ng and bundle it like the tsx and pascal grammars. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Add Language.ANGULAR for .html files on the tree-sitter-angular grammar, which covers plain HTML as well. Metrics count control flow blocks, structural directives and the logical, ternary and nullish operators of bindings; extraction yields the identifiers of bound expressions, HTML comments and text content; dependency extraction yields the custom elements and pipes a template uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…lasses A template refers to a component by the element its selector names and to a pipe by its pipe name. Declaration.templateNames carries both, read from the @component and @pipe decorators, so a consumer can match the used types of a template to the classes that declare them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Map .html files to the Angular template grammar, so unifiedparser reports complexity, comment lines and lines of code for them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Register .html in domainlanguageparser with a keyword list of the template syntax and built-in pipes that identifiers split into. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
dependencyparser analyses .html files as Angular templates. A template uses the selectors and pipe names it names; the resolver rewrites each one that exactly one TypeScript class declares to that class, so the template depends on the component and pipe files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
tree-sitter-angular lexes <!-- --> inside an attribute value or a string literal as a comment. Such a comment no longer counts as a comment line and is no longer extracted as a comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…ates tree-sitter-angular reads true, false, null and undefined as identifiers, and an output is called with emit in nearly every template; none of them is a domain word. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
A Cellars and Centaurs app of standalone components whose templates use control flow blocks, structural directives, pipes and child components, plus the edge cases and the domain texts of the sample project spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…templates Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…ript extractors The Angular template name extractor kept its own copy of the constant, which the dependency gate reads as a reference to the one of the declaration extractor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…ates The value of a plain attribute counts as a string when its name marks text a user reads: title, alt, placeholder, label, the ARIA text attributes, and any name ending in hint, label, title, text, tooltip, placeholder, description or message. Markup values such as class, style or src, i18n markers and Angular binding prefixes stay out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
A tree-sitter grammar that parses ANSI, T-SQL, PL/SQL, PL/pgSQL and MySQL without choosing a dialect: exact for routines, control flow, exception handlers, logical operators, comments and the objects a statement reads, writes or calls; every other token is an opaque item instead of an ERROR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Built with tree-sitter-ng's gen and buildNative tasks for Linux and macOS on x86_64 and aarch64 and Windows on x86_64. The library is named sql-island so that it can not be mistaken for tree-sitter-ng's tree-sitter-sql; the grammar README lists the rebuild commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…eterized test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
SQL joins the tree-sitter excavation site as one language for all dialects: complexity from branches, loops, CASE arms, exception handlers and logical operators, procedures, functions and triggers as functions with their parameters, the names a script gives and uses for the domain lens, and its tables, views, packages and routines as declarations that use other objects by name. Each common table expression is now a node of its own, so its name can be told apart from the tables it reads; the jar is rebuilt from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Tables made from other tables (INHERITS, PARTITION OF, LIKE), synonyms and %TYPE/%ROWTYPE anchors now depend on the objects they name, created objects lie under their schema, and a parameter after one with a default value is counted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…of whens Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…ine bodies The SQL island grammar 0.2.0 parses every remaining construct of the public fixtures: LOOP as a plain name, semicolons in OPENROWSET, bracketed names over several lines, Oracle 21c iteration controls, psql \copy over several lines, MySQL labels glued to their colon, backslashes in double quotes, '\'' and (.a BIGINT). A routine body without a block goes on up to GO, the next CREATE or the end of the file, a MySQL routine may consist of a single statement, and the END line of a body no longer counts for the routine. The jar is rebuilt as tree-sitter-sql-island-0.2.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…xity Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…first Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…ames by case An object created in several files resolves to the last of them in path order, the latest migration. A name in double quotes keeps its case unless it is written all in one case; every other name compares in lower case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…domain words Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…es of SQL files unifiedparser reports number_of_stored_procedures, number_of_triggers, number_of_views and number_of_tables for every file, 0 for languages without such objects, like the other metrics. A language marks the nodes to count with the new Counted metric, which one node counter calculates for every kind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Only the rows of a global temporary table belong to a session; the table is an object of the schema. It is a table definition again, counted in number_of_tables and declared for the dependency parser. The temporary tables of a session (TEMP, TEMPORARY, PRIVATE TEMPORARY, #t, ##t) stay excluded. Grammar 0.6.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…ther kinds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…hing The scan returns no project when nothing could be measured and reports the error itself, so the private exception that only carried the message to the catch goes away, and failWith no longer pretends to return a project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…lyse FailedFile, FailureReport and a RunExitCode that ends a run with an error move into the analyser interface, and the excavation site names the failures that make a parser unusable, so the dependency and domain language parsers can report the way unifiedparser does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Like unifiedparser, dependencyparser warns once per distinct cause, a timeout being one, with how many files it hit and the first five. A grammar that does not fit the core library or a native library that cannot be loaded ends the run with an error, and so does a run in which every file failed, instead of an empty map with exit code 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…ause Like unifiedparser, domainlanguageparser warns once per distinct cause with how many files it hit and the first five, instead of a stack trace per file. A grammar that does not fit the core library or a native library that cannot be loaded ends the run with an error, and so does a run in which every file failed, instead of an empty map with exit code 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…ot analyse Each parser page says that a failed file is skipped with a warning per cause and that a run without any analysed file, or with an unusable grammar or native library, ends with exit code 1 and no map. The changelog says it in one entry for the three parsers, and the entry on exported strings is one plain sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…o use Oracle spells its global temporary table GLOBAL TEMPORARY only; GLOBAL TEMP is PostgreSQL's table of a session and is no table definition any more. ON COMMIT DELETE ROWS (or PRESERVE ROWS or DEFINITION) is one token, so it no longer reads as a DELETE from a table named rows, while ON [PRIMARY] and a name like commit_id stay as they were. Grammar 0.7.0, regenerated after the version bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…round A fresh run confirms every number of the sample; the counts of the public code and the changes since the third round are updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…file A file it could not read was dropped silently with a stack trace, so a project of unreadable files ended in an empty map with exit code 0. Only a file of no supported language is left out now; one that cannot be read is a failed file with its cause, warned about with the others, and ends the run with an error when no file could be analysed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
A parser that ends its run with an error keeps the message as its failure message, and ccsh gate reports it, instead of only saying that the analyser ended with exit code 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
A type body is read like a package body: its member and static procedures count as stored procedures and have the type as parent. Tests and corpus pin this down; the docs name type bodies next to package bodies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
CREATE [GLOBAL] TEMP[ORARY] VIEW is no view definition any more: it is not counted and declares no dependency leaf, while what its query uses stays a use of the script. Grammar 0.8.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…ange The drop of utPLSQL's procedures and the First Responder Kit's tables comes from leaving out what a routine creates when it runs, not from the changes since the third round, which leave the public totals unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…file ccsh gate --quiet hides the warnings of its analysers, so its only message, "all N failed, see the warnings above", lost the cause. The error now names it: the one cause that made every file fail, or the most frequent one and how many files it hit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
|
Important Review skippedToo many files! This PR contains 387 files, which is 237 over the limit of 150. To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configuration
⛔ Files ignored due to path filters: 2
📒 Files selected for processing: 387
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Only the jars built from them stay in treeSitterExcavationSite/libs, like those of the other languages; the sources move to the ignored tree-sitter-grammars/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
An accept entry of a dependency rule names the exact files of one cycle, or the from and to of one upward dependency, with the reason it is accepted. The gate warns about an entry the analysis no longer finds, so it gets removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Its template renders the next tree level with the component's own selector, which the Angular support now reports as a cycle between the two files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
…e class Brings the cognitive complexity of processFilesIndividually below Sonar's limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
The Dependencies tab appears for every map with dependency data. The switch in the global configuration is gone, and migration v34 drops its saved value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
The jars in treeSitterExcavationSite/libs carry no license file, so the MIT notices of tree-sitter-angular, tree-sitter-html, tree-sitter-typescript, tree-sitter-pascal and tree-sitter-ng now ship inside the ccsh jar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
The migrations of the persisted CcState record move out of indexedDBWriter.ts into indexedDB/migrations: one file and spec per version, the registry that chains them, and the seeding helpers they share. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RwnKgUCkz77hP6uvnPgrL
|
|



{Meaningful title}
Please read the CONTRIBUTING.md before opening a PR.
Closes: #
Description
Descriptive pull request text, answering:
Definition of Done
A PR is only ready for merge once all the following acceptance criteria are fulfilled:
Screenshots or gifs