energy-state-analyzer 0.23.4 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -1
- package/README.md +5 -1
- package/dist/{a5f4afce3ed7382a77b6.wasm → 32e18d5b63d8bd81a7b3.wasm} +0 -0
- package/dist/cli.js +1 -1
- package/dist/web-tree-sitter.wasm +0 -0
- package/docs/architecture.md +3 -0
- package/docs/cli.md +2 -2
- package/docs/detectors/magic-strings.md +16 -3
- package/docs/detectors/match-opportunities.md +1 -1
- package/docs/detectors/primitive-obsession.md +1 -1
- package/docs/source-guide.md +239 -0
- package/grammars/tree-sitter-tsx.wasm +0 -0
- package/grammars/tree-sitter-typescript.NOTICE.md +6 -0
- package/lean-toolchain +1 -0
- package/package.json +2 -1
|
Binary file
|
package/docs/architecture.md
CHANGED
|
@@ -6,6 +6,9 @@ ESM into the CommonJS artifacts exposed by `package.json`.
|
|
|
6
6
|
|
|
7
7
|
## Reading path
|
|
8
8
|
|
|
9
|
+
The [source guide](source-guide.md) connects the file narratives, function contracts, and ADCs
|
|
10
|
+
and inventories the authored modules, tests, and build boundaries.
|
|
11
|
+
|
|
9
12
|
Start with [Analyze](../src/Core/Analyze.fs) and
|
|
10
13
|
[DetectorPipeline](../src/Core/DetectorPipeline.fs) for the shared transformation. Read
|
|
11
14
|
[LanguageAdapter](../src/Core/LanguageAdapter.fs) with one adapter in `src/Languages/` to see how
|
package/docs/cli.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The same detectors also run headlessly, without VS Code, useful for CI or for an AI coding agent that wants to fix findings in code it just generated and verify the result. Published to npm, so no clone or install step is required:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npx energy-state-analyzer path/to/file.py # or .fs / .fsx / .ts / .kt / .cpp / .cs / .erl / .rs
|
|
6
|
+
npx energy-state-analyzer path/to/file.py # or .fs / .fsx / .ts / .tsx / .kt / .cpp / .cs / .erl / .rs
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Or install it as a project/global dependency and call it directly:
|
|
@@ -30,7 +30,7 @@ Unknown flags, invalid flag values, missing explicit paths, and unsupported expl
|
|
|
30
30
|
| --- | --- |
|
|
31
31
|
| Python | `.py` |
|
|
32
32
|
| F# | `.fs`, `.fsx`, `.fsi` |
|
|
33
|
-
| TypeScript | `.ts` |
|
|
33
|
+
| TypeScript / TSX | `.ts`, `.tsx` |
|
|
34
34
|
| C# | `.cs`, `.csx` |
|
|
35
35
|
| Erlang | `.erl`, `.hrl` |
|
|
36
36
|
| Rust | `.rs` |
|
|
@@ -6,9 +6,17 @@ Flags a string literal only where an unnamed one actually risks a silent typo, d
|
|
|
6
6
|
|
|
7
7
|
A string literal is a candidate only when it sits at a decision point:
|
|
8
8
|
|
|
9
|
-
- Compared with
|
|
9
|
+
- Compared with equality or inequality (`==`, `===`, F#'s `=`, `!=`, `!==`, `<>`, Erlang's `/=` and `=/=`).
|
|
10
10
|
- Checked for membership (Python's `x in (...)`).
|
|
11
11
|
- Used as a dict/object key or subscript index.
|
|
12
|
+
- Used as a match/switch case pattern: Rust `match` arms, `if let`/`while let`, and `matches!` patterns,
|
|
13
|
+
TypeScript and C# `switch` cases (including C# switch expressions and `is` patterns), Python
|
|
14
|
+
`match`/`case`, Kotlin `when` entries, F# `match`/`function` rules, and Erlang `case` clauses. Literals nested in or-, tuple-,
|
|
15
|
+
and constructor patterns such as `Some("a" | "b")` count; guards and arm results don't.
|
|
16
|
+
|
|
17
|
+
In Rust, a literal wrapped in a single-argument variant constructor is still a comparison operand, so
|
|
18
|
+
`kind == Some("analysis")` counts like `kind == "analysis"`. Lowercase calls such as `label("x")` stay
|
|
19
|
+
opaque because their argument isn't the compared value.
|
|
12
20
|
|
|
13
21
|
A message being logged, thrown, or returned isn't a decision point, so it's left alone entirely, as is a docstring. Any f-string, template literal, `.format()`, or `%`-formatted string is exempt too, since a placeholder is itself evidence the string isn't standing in for an enum value. A single-character string is also exempt (too short to plausibly carry hidden meaning).
|
|
14
22
|
|
|
@@ -35,6 +43,11 @@ def route(status):
|
|
|
35
43
|
|
|
36
44
|
## Known limitations
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
Rust macro arguments are unparsed token trees. `matches!` is read token by token (its pattern follows the
|
|
47
|
+
first top-level comma and ends at an `if` guard), but a guard's own comparison and other macros such as
|
|
48
|
+
`assert_eq!` aren't interpreted. C++ has no case pattern support because its `switch` labels can't be
|
|
49
|
+
strings.
|
|
50
|
+
|
|
51
|
+
The comparison/membership/dict-key scan and the formatted-string exemption are fully implemented for Python, and partially for TypeScript (no `.includes()` membership support yet), F# (no dict/subscript node, no interpolated-string exemption), and C++ (equality and subscripts, but no semantic container-membership idiom). C++ raw string literals use a separate grammar node and encoded/prefixed literals are conservatively excluded. See the `LanguageAdapter` fields in `src/Core/LanguageAdapter.fs` for exactly what's modeled per language.
|
|
39
52
|
|
|
40
|
-
It also doesn't (yet) special-case enum-like keyword/default arguments (e.g. `mode="fast"`) as a lower-confidence decision point, only equality, membership,
|
|
53
|
+
It also doesn't (yet) special-case enum-like keyword/default arguments (e.g. `mode="fast"`) as a lower-confidence decision point, only equality/inequality, membership, dict/index-key, and case-pattern positions count.
|
|
@@ -4,7 +4,7 @@ Flags an `if`/`elif`/`elif` chain (or a nested `else if` in TypeScript, Kotlin,
|
|
|
4
4
|
|
|
5
5
|
## What it flags
|
|
6
6
|
|
|
7
|
-
A chain of 3 or more branches (configurable), all discriminating via equality or membership checks against the *same single variable*, is flagged. An unconditional catch-all `else` at the end still qualifies, since it contributes no discriminant and isn't itself a "branch" for this check, but a chain mixing unrelated conditions across branches does not qualify, since a `match`/`switch` can't express that kind of dispatch anyway.
|
|
7
|
+
A chain of 3 or more branches (configurable), all discriminating via equality or membership checks against the *same single variable*, is flagged. An unconditional catch-all `else` at the end still qualifies, since it contributes no discriminant and isn't itself a "branch" for this check, but a chain mixing unrelated conditions across branches does not qualify, since a `match`/`switch` can't express that kind of dispatch anyway. Inequality checks (`!=`, `<>`) don't count: excluding one value isn't selecting a branch.
|
|
8
8
|
|
|
9
9
|
Runs on Python, F#, TypeScript, Kotlin, C++, and Rust.
|
|
10
10
|
|
|
@@ -10,7 +10,7 @@ In Python, a pair is suppressed only when *both* parameters are keyword-only (af
|
|
|
10
10
|
|
|
11
11
|
**Boolean blindness.** Two or more boolean parameters (`bool` in Python, F#, C++, and Rust; `boolean` in TypeScript; `Boolean` in Kotlin) anywhere in a signature, not just adjacent ones, are flagged separately from the swap-risk check above. `exportData(compress: bool, notify: bool, overwrite: bool)` reads the same at a positional call site regardless of which flag controls what, and so does `exportData(mode: bool, name: str, notify: bool)`: a non-boolean parameter between two booleans breaks swap-*adjacency*, but it does nothing to fix the blindness, since the domain still permits fewer combinations than the type system allows. A boolean is excluded from the count only when the language's keyword-only mechanism forces every call site to name it (e.g. Python's `*`/`*args` boundary). The suggested fix is a single named type covering the valid combinations (an enum, a discriminated union), not a distinct type per flag, since wrapping each boolean separately keeps the combinatorial explosion, only the swap risk goes away.
|
|
12
12
|
|
|
13
|
-
**Stringly-typed control flow.** A variable compared against 3 or more distinct string literals within one function is a de facto enum encoded as strings, with no exhaustiveness checking and no typo protection at the type level. Runs on Python, F#, TypeScript, Kotlin, and C++; Python additionally flags a variable checked against a literal tuple/list/set in one `in` expression, and F# additionally flags the idiomatic `match` on string-literal cases dispatching on one variable, since the two are the same de facto enum expressed in each language's dominant form.
|
|
13
|
+
**Stringly-typed control flow.** A variable compared against 3 or more distinct string literals within one function is a de facto enum encoded as strings, with no exhaustiveness checking and no typo protection at the type level. Runs on Python, F#, TypeScript, Kotlin, and C++; Python additionally flags a variable checked against a literal tuple/list/set in one `in` expression, and F# additionally flags the idiomatic `match` on string-literal cases dispatching on one variable, since the two are the same de facto enum expressed in each language's dominant form. Inequality checks (`!=`, `<>`) don't count toward the distinct values, because excluding one value doesn't choose among the variable's states.
|
|
14
14
|
|
|
15
15
|
## Example
|
|
16
16
|
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Reading the source
|
|
2
|
+
|
|
3
|
+
Energy State Analyzer turns source syntax into maintainability findings in a VS Code
|
|
4
|
+
extension and a Node CLI. Both hosts use the same registered detectors and project
|
|
5
|
+
thresholds. Grammar adapters describe syntax; they do not run a compiler, resolve
|
|
6
|
+
symbols, or prove a suggested refactoring correct.
|
|
7
|
+
|
|
8
|
+
Read the file introductions, definition documentation, and decision comments together.
|
|
9
|
+
Narrative describes current behavior; ADCs preserve deliberate choices, invariants,
|
|
10
|
+
external assumptions, and accepted costs. The [architecture](architecture.md) describes
|
|
11
|
+
build boundaries, and [ADC guidance](../AGENT_DECISION_COMMENTS.md) defines the annotation
|
|
12
|
+
syntax. Source comments use Markdown within native F# comments. The two optional
|
|
13
|
+
Lean contracts below have an explicit extraction and checking command.
|
|
14
|
+
|
|
15
|
+
## Follow a document
|
|
16
|
+
|
|
17
|
+
1. [CLI](../src/Cli.fs) parses arguments, validates paths, resolves configuration, and
|
|
18
|
+
dispatches a scan or revision comparison. [CliRuntime](../src/CliRuntime.fs) reads
|
|
19
|
+
source and caches parsers. [CliModes](../src/CliModes.fs) chooses reports and exit codes.
|
|
20
|
+
2. [Extension](../src/Extension/Extension.fs) owns editor events, commands, caches, and
|
|
21
|
+
presentation resources. [Analysis](../src/Extension/Analysis.fs) reads current document
|
|
22
|
+
text and folder policy. Pending grammar loads are shared, and stale document or
|
|
23
|
+
activation identities are checked before results are displayed.
|
|
24
|
+
3. [ParsedAnalysis](../src/Core/ParsedAnalysis.fs) parses source, calls the synchronous
|
|
25
|
+
analyzer, and releases the tree. Its result contains either detached findings or a
|
|
26
|
+
typed error, never partial findings from a failed analysis.
|
|
27
|
+
4. [Analyze](../src/Core/Analyze.fs) builds the document context and runs
|
|
28
|
+
[DetectorPipeline](../src/Core/DetectorPipeline.fs). Stages accumulate findings in
|
|
29
|
+
reverse order; Analyze restores order and applies
|
|
30
|
+
[Suppressions](../src/Core/Suppressions.fs) once to the complete result.
|
|
31
|
+
5. [Violation](../src/Core/Violation.fs) defines the detached result and stable public
|
|
32
|
+
rule identities. [Report](../src/Core/Report.fs) computes additive scores, while
|
|
33
|
+
[ReportHuman](../src/Core/ReportHuman.fs) provides a separate prioritization view.
|
|
34
|
+
Editor [decorations](../src/Extension/Decorations.fs) and
|
|
35
|
+
[diagnostics](../src/Extension/Diagnostics.fs) convert pure presentation specifications
|
|
36
|
+
to host objects.
|
|
37
|
+
|
|
38
|
+
## Read the boundaries
|
|
39
|
+
|
|
40
|
+
| Boundary | Responsibility and limits |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| [Config](../src/Core/Config.fs) | Defaults and project-file overlays; CLI flags and editor toggles are applied by their hosts. |
|
|
43
|
+
| [Registry](../src/Languages/Registry.fs) | Editor language IDs and longest matching filename suffixes. |
|
|
44
|
+
| [LanguageAdapter](../src/Core/LanguageAdapter.fs) | Callable roles, branches, imports, recovery regions, and literal exemptions; views borrow a live tree. |
|
|
45
|
+
| [TreeSitter](../src/Core/TreeSitter.fs) | Native runtime initialization, parsing, node access, and tree release. |
|
|
46
|
+
| [Scan](../src/Core/Scan.fs) | Supported files, ignore patterns, limited wildcards, and deterministic path ordering. |
|
|
47
|
+
| [NodeInterop](../src/Core/NodeInterop.fs) | Selected throwing Node operations converted to typed results; no rollback guarantee. |
|
|
48
|
+
| [SARIF export](../src/Extension/SarifExport.fs) | Disk-based workspace scan followed by report writing; writes are not atomic. |
|
|
49
|
+
| [TestUtils](../tests/TestUtils.fs) | Real grammar/fixture integration harness; cached fixture trees live for the test process. |
|
|
50
|
+
| [Fixture matrix](../tests/DetectorFixtureMatrixTests.fs) | Named positive, negative, and language-limitation scenarios through the complete pipeline. |
|
|
51
|
+
|
|
52
|
+
## Build metadata and excluded inputs
|
|
53
|
+
|
|
54
|
+
[package.json](../package.json) owns npm scripts, extension contributions, and published
|
|
55
|
+
entry paths. [webpack.config.js](../webpack.config.js) packages separate Fable output
|
|
56
|
+
roots into CommonJS extension and CLI bundles, including the CLI shebang and runtime
|
|
57
|
+
WASM. [EnergyState.fsproj](../src/EnergyState.fsproj) lists F# files in dependency order;
|
|
58
|
+
the [CLI project](../cli/EnergyState.Cli.fsproj) and
|
|
59
|
+
[test project](../tests/EnergyState.Tests.fsproj) select their executable entry points.
|
|
60
|
+
These files and the [Justfile](../Justfile) are the source of truth for generated output.
|
|
61
|
+
JSON manifests and settings remain data; their ownership is explained here instead of
|
|
62
|
+
adding invalid JSON comments.
|
|
63
|
+
|
|
64
|
+
This annotation pass covers authored F# product modules, CLI entry, test suites and
|
|
65
|
+
helpers, and the webpack packaging boundary. It excludes generated Fable output,
|
|
66
|
+
vendored grammars, dependency code, and analyzer input fixtures under
|
|
67
|
+
`src/test/fixtures/` and `tests/scan-fixtures/`. Fixture text is behaviorally significant:
|
|
68
|
+
adding comments can change line ranges and deliberately measured source shapes.
|
|
69
|
+
The retained `src/test/extension.test.js` is a generated legacy test artifact, not the
|
|
70
|
+
current Scriptorium source. PythonTypeInfo is retained extraction scaffolding and does
|
|
71
|
+
not participate in the registered detector pipeline.
|
|
72
|
+
|
|
73
|
+
## Checking the Lean contracts
|
|
74
|
+
|
|
75
|
+
Compact `lean:` predicates beside `Context.addViolations` and `Cyclomatic.addDecision`
|
|
76
|
+
specify finding order and the change in `E - N + 2`. Nearby prose maps parameters to
|
|
77
|
+
F# values and states the preconditions. They are contracts, not implementation proofs.
|
|
78
|
+
|
|
79
|
+
Run `just lean-check` with Python 3.10+, Lean via elan, and the
|
|
80
|
+
[ADC extractor](https://github.com/dbrattli/adc/tree/cf571c36bceeeb816203b0074f67f0c221d9177d/tools)
|
|
81
|
+
at `../adc/tools/leanify.py`, or pass its path: `just lean-check /path/to/leanify.py`.
|
|
82
|
+
[lean-toolchain](../lean-toolchain) pins Lean 4.24.0. The command checks formation with
|
|
83
|
+
warnings as errors and writes ignored views under `.lean-out/`; edit the F# comments.
|
|
84
|
+
Run it when contracts change. Normal builds and CI do not require the external ADC checkout.
|
|
85
|
+
|
|
86
|
+
## Source inventory
|
|
87
|
+
|
|
88
|
+
The links below include private implementation files as well as entry points. Local
|
|
89
|
+
function documentation explains contracts; nearby inline comments explain significant
|
|
90
|
+
closures and grammar-hook decisions. Named test cases specify the scenario and expected
|
|
91
|
+
outcome, with helper contracts beside their definitions.
|
|
92
|
+
|
|
93
|
+
### cli
|
|
94
|
+
|
|
95
|
+
- [Main.fs](../cli/Main.fs)
|
|
96
|
+
|
|
97
|
+
### src
|
|
98
|
+
|
|
99
|
+
- [Cli.fs](../src/Cli.fs)
|
|
100
|
+
- [CliModes.fs](../src/CliModes.fs)
|
|
101
|
+
- [CliNode.fs](../src/CliNode.fs)
|
|
102
|
+
- [CliRuntime.fs](../src/CliRuntime.fs)
|
|
103
|
+
|
|
104
|
+
### src/Core
|
|
105
|
+
|
|
106
|
+
- [Analyze.fs](../src/Core/Analyze.fs)
|
|
107
|
+
- [BodyLines.fs](../src/Core/BodyLines.fs)
|
|
108
|
+
- [CoherenceCollection.fs](../src/Core/CoherenceCollection.fs)
|
|
109
|
+
- [Config.fs](../src/Core/Config.fs)
|
|
110
|
+
- [Context.fs](../src/Core/Context.fs)
|
|
111
|
+
- [DetectorPipeline.fs](../src/Core/DetectorPipeline.fs)
|
|
112
|
+
- [Esaignore.fs](../src/Core/Esaignore.fs)
|
|
113
|
+
- [FsPath.fs](../src/Core/FsPath.fs)
|
|
114
|
+
- [LanguageAdapter.fs](../src/Core/LanguageAdapter.fs)
|
|
115
|
+
- [NamingCohesion.fs](../src/Core/NamingCohesion.fs)
|
|
116
|
+
- [NodeInterop.fs](../src/Core/NodeInterop.fs)
|
|
117
|
+
- [ParsedAnalysis.fs](../src/Core/ParsedAnalysis.fs)
|
|
118
|
+
- [Paths.fs](../src/Core/Paths.fs)
|
|
119
|
+
- [Position.fs](../src/Core/Position.fs)
|
|
120
|
+
- [Report.fs](../src/Core/Report.fs)
|
|
121
|
+
- [ReportDiff.fs](../src/Core/ReportDiff.fs)
|
|
122
|
+
- [ReportHuman.fs](../src/Core/ReportHuman.fs)
|
|
123
|
+
- [ReportSarif.fs](../src/Core/ReportSarif.fs)
|
|
124
|
+
- [Scan.fs](../src/Core/Scan.fs)
|
|
125
|
+
- [Suppressions.fs](../src/Core/Suppressions.fs)
|
|
126
|
+
- [TreeSitter.fs](../src/Core/TreeSitter.fs)
|
|
127
|
+
- [TypeCohesion.fs](../src/Core/TypeCohesion.fs)
|
|
128
|
+
- [Violation.fs](../src/Core/Violation.fs)
|
|
129
|
+
|
|
130
|
+
### src/Core/Detectors
|
|
131
|
+
|
|
132
|
+
- [ClassRelatedness.fs](../src/Core/Detectors/ClassRelatedness.fs)
|
|
133
|
+
- [Cognitive.fs](../src/Core/Detectors/Cognitive.fs)
|
|
134
|
+
- [Coherence.fs](../src/Core/Detectors/Coherence.fs)
|
|
135
|
+
- [Cyclomatic.fs](../src/Core/Detectors/Cyclomatic.fs)
|
|
136
|
+
- [ErrorShadowing.fs](../src/Core/Detectors/ErrorShadowing.fs)
|
|
137
|
+
- [ImportCoherence.fs](../src/Core/Detectors/ImportCoherence.fs)
|
|
138
|
+
- [Inversion.fs](../src/Core/Detectors/Inversion.fs)
|
|
139
|
+
- [LogicalControlFlow.fs](../src/Core/Detectors/LogicalControlFlow.fs)
|
|
140
|
+
- [MagicNumber.fs](../src/Core/Detectors/MagicNumber.fs)
|
|
141
|
+
- [MagicString.fs](../src/Core/Detectors/MagicString.fs)
|
|
142
|
+
- [MatchOpportunity.fs](../src/Core/Detectors/MatchOpportunity.fs)
|
|
143
|
+
- [MatchOpportunitySupport.fs](../src/Core/Detectors/MatchOpportunitySupport.fs)
|
|
144
|
+
- [Nesting.fs](../src/Core/Detectors/Nesting.fs)
|
|
145
|
+
- [OpaqueBoolean.fs](../src/Core/Detectors/OpaqueBoolean.fs)
|
|
146
|
+
- [ParameterCount.fs](../src/Core/Detectors/ParameterCount.fs)
|
|
147
|
+
- [ParseDontValidate.fs](../src/Core/Detectors/ParseDontValidate.fs)
|
|
148
|
+
- [PrimitiveObsession.fs](../src/Core/Detectors/PrimitiveObsession.fs)
|
|
149
|
+
- [TestFile.fs](../src/Core/Detectors/TestFile.fs)
|
|
150
|
+
|
|
151
|
+
### src/Core/PythonTypeInfo
|
|
152
|
+
|
|
153
|
+
- [Classes.fs](../src/Core/PythonTypeInfo/Classes.fs)
|
|
154
|
+
- [Extraction.fs](../src/Core/PythonTypeInfo/Extraction.fs)
|
|
155
|
+
- [Functions.fs](../src/Core/PythonTypeInfo/Functions.fs)
|
|
156
|
+
- [Imports.fs](../src/Core/PythonTypeInfo/Imports.fs)
|
|
157
|
+
- [PythonTypeInfo.fs](../src/Core/PythonTypeInfo/PythonTypeInfo.fs)
|
|
158
|
+
|
|
159
|
+
### src/Extension
|
|
160
|
+
|
|
161
|
+
- [Analysis.fs](../src/Extension/Analysis.fs)
|
|
162
|
+
- [Configuration.fs](../src/Extension/Configuration.fs)
|
|
163
|
+
- [ConfigurationValues.fs](../src/Extension/ConfigurationValues.fs)
|
|
164
|
+
- [DecorationModel.fs](../src/Extension/DecorationModel.fs)
|
|
165
|
+
- [Decorations.fs](../src/Extension/Decorations.fs)
|
|
166
|
+
- [DiagnosticModel.fs](../src/Extension/DiagnosticModel.fs)
|
|
167
|
+
- [Diagnostics.fs](../src/Extension/Diagnostics.fs)
|
|
168
|
+
- [Extension.fs](../src/Extension/Extension.fs)
|
|
169
|
+
- [Grammar.fs](../src/Extension/Grammar.fs)
|
|
170
|
+
- [LoadedLanguage.fs](../src/Extension/LoadedLanguage.fs)
|
|
171
|
+
- [SarifExport.fs](../src/Extension/SarifExport.fs)
|
|
172
|
+
|
|
173
|
+
### src/Extension/Vscode
|
|
174
|
+
|
|
175
|
+
- [DiagnosticValues.fs](../src/Extension/Vscode/DiagnosticValues.fs)
|
|
176
|
+
- [Diagnostics.fs](../src/Extension/Vscode/Diagnostics.fs)
|
|
177
|
+
- [Document.fs](../src/Extension/Vscode/Document.fs)
|
|
178
|
+
- [Host.fs](../src/Extension/Vscode/Host.fs)
|
|
179
|
+
- [Identity.fs](../src/Extension/Vscode/Identity.fs)
|
|
180
|
+
- [Presentation.fs](../src/Extension/Vscode/Presentation.fs)
|
|
181
|
+
- [Workspace.fs](../src/Extension/Vscode/Workspace.fs)
|
|
182
|
+
|
|
183
|
+
### src/Languages
|
|
184
|
+
|
|
185
|
+
- [CPlusPlus.fs](../src/Languages/CPlusPlus.fs)
|
|
186
|
+
- [CSharp.fs](../src/Languages/CSharp.fs)
|
|
187
|
+
- [CognitiveSyntax.fs](../src/Languages/CognitiveSyntax.fs)
|
|
188
|
+
- [Erlang.fs](../src/Languages/Erlang.fs)
|
|
189
|
+
- [ErlangValidation.fs](../src/Languages/ErlangValidation.fs)
|
|
190
|
+
- [FSharp.fs](../src/Languages/FSharp.fs)
|
|
191
|
+
- [Kotlin.fs](../src/Languages/Kotlin.fs)
|
|
192
|
+
- [Python.fs](../src/Languages/Python.fs)
|
|
193
|
+
- [PythonAdapterSyntax.fs](../src/Languages/PythonAdapterSyntax.fs)
|
|
194
|
+
- [Registry.fs](../src/Languages/Registry.fs)
|
|
195
|
+
- [Rust.fs](../src/Languages/Rust.fs)
|
|
196
|
+
- [RustImports.fs](../src/Languages/RustImports.fs)
|
|
197
|
+
- [RustPatterns.fs](../src/Languages/RustPatterns.fs)
|
|
198
|
+
- [RustValidation.fs](../src/Languages/RustValidation.fs)
|
|
199
|
+
- [TypeScript.fs](../src/Languages/TypeScript.fs)
|
|
200
|
+
- [TypeScriptReExports.fs](../src/Languages/TypeScriptReExports.fs)
|
|
201
|
+
- [ValidationSyntax.fs](../src/Languages/ValidationSyntax.fs)
|
|
202
|
+
|
|
203
|
+
### tests
|
|
204
|
+
|
|
205
|
+
- [AnonymousCallableTests.fs](../tests/AnonymousCallableTests.fs)
|
|
206
|
+
- [CPlusPlusTests.fs](../tests/CPlusPlusTests.fs)
|
|
207
|
+
- [CSharpTests.fs](../tests/CSharpTests.fs)
|
|
208
|
+
- [CallableTestUtils.fs](../tests/CallableTestUtils.fs)
|
|
209
|
+
- [CognitiveRuleCases.fs](../tests/CognitiveRuleCases.fs)
|
|
210
|
+
- [CognitiveRuleTests.fs](../tests/CognitiveRuleTests.fs)
|
|
211
|
+
- [CognitiveTests.fs](../tests/CognitiveTests.fs)
|
|
212
|
+
- [CoherenceTests.fs](../tests/CoherenceTests.fs)
|
|
213
|
+
- [ConfigTests.fs](../tests/ConfigTests.fs)
|
|
214
|
+
- [CyclomaticTests.fs](../tests/CyclomaticTests.fs)
|
|
215
|
+
- [DetectorFixtureMatrixTests.fs](../tests/DetectorFixtureMatrixTests.fs)
|
|
216
|
+
- [ErlangTests.fs](../tests/ErlangTests.fs)
|
|
217
|
+
- [ErrorShadowingTests.fs](../tests/ErrorShadowingTests.fs)
|
|
218
|
+
- [ExtensionPresentationTests.fs](../tests/ExtensionPresentationTests.fs)
|
|
219
|
+
- [GrammarTests.fs](../tests/GrammarTests.fs)
|
|
220
|
+
- [Helpers.fs](../tests/Helpers.fs)
|
|
221
|
+
- [InversionTests.fs](../tests/InversionTests.fs)
|
|
222
|
+
- [LogicalControlFlowTests.fs](../tests/LogicalControlFlowTests.fs)
|
|
223
|
+
- [MagicNumberTests.fs](../tests/MagicNumberTests.fs)
|
|
224
|
+
- [MagicStringTests.fs](../tests/MagicStringTests.fs)
|
|
225
|
+
- [Main.fs](../tests/Main.fs)
|
|
226
|
+
- [MatchOpportunityTests.fs](../tests/MatchOpportunityTests.fs)
|
|
227
|
+
- [NestingTests.fs](../tests/NestingTests.fs)
|
|
228
|
+
- [OpaqueBooleanTests.fs](../tests/OpaqueBooleanTests.fs)
|
|
229
|
+
- [ParameterCountTests.fs](../tests/ParameterCountTests.fs)
|
|
230
|
+
- [ParseDontValidateTests.fs](../tests/ParseDontValidateTests.fs)
|
|
231
|
+
- [ParsedAnalysisTests.fs](../tests/ParsedAnalysisTests.fs)
|
|
232
|
+
- [PrimitiveObsessionTests.fs](../tests/PrimitiveObsessionTests.fs)
|
|
233
|
+
- [RecoveryRuleTests.fs](../tests/RecoveryRuleTests.fs)
|
|
234
|
+
- [ReportTests.fs](../tests/ReportTests.fs)
|
|
235
|
+
- [RustTests.fs](../tests/RustTests.fs)
|
|
236
|
+
- [SpikeTests.fs](../tests/SpikeTests.fs)
|
|
237
|
+
- [SuppressionsTests.fs](../tests/SuppressionsTests.fs)
|
|
238
|
+
- [TestUtils.fs](../tests/TestUtils.fs)
|
|
239
|
+
- [TsxTests.fs](../tests/TsxTests.fs)
|
|
Binary file
|
|
@@ -5,3 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
- SHA-256: `778025db5a8be0e70f8ccc3671e486dfeddd048c25d9e8a70c26de2e1bf6f97d`
|
|
7
7
|
- License: MIT; see `tree-sitter-typescript.LICENSE` in this directory.
|
|
8
|
+
|
|
9
|
+
`tree-sitter-tsx.wasm` is the companion official WebAssembly release artifact from
|
|
10
|
+
the same release, used for TypeScript with JSX (`.tsx`).
|
|
11
|
+
|
|
12
|
+
- SHA-256: `79e5da75ea62855a0cd67177685f0164eac87d5f630b3cbe1e0a099751ad30f8`
|
|
13
|
+
- License: MIT; see `tree-sitter-typescript.LICENSE` in this directory.
|
package/lean-toolchain
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
leanprover/lean4:v4.24.0
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "energy-state-analyzer",
|
|
3
3
|
"displayName": "Energy State Analyzer",
|
|
4
4
|
"description": "Visualize code energy states in real-time (Python, F#, TypeScript, Kotlin, C++, C#, Erlang, Rust)",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.25.0",
|
|
6
6
|
"publisher": "cardamom-code",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"icon": "images/icon.png",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"onLanguage:python",
|
|
39
39
|
"onLanguage:fsharp",
|
|
40
40
|
"onLanguage:typescript",
|
|
41
|
+
"onLanguage:typescriptreact",
|
|
41
42
|
"onLanguage:kotlin",
|
|
42
43
|
"onLanguage:cpp",
|
|
43
44
|
"onLanguage:csharp",
|