Add editorconfig validation to linting - #7594
Conversation
Overall package sizeSelf size: 6.25 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.1.0 | 101.28 kB | 840.46 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
BenchmarksBenchmark execution time: 2026-06-18 14:01:32 Comparing candidate commit c559ab5 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1953 metrics, 12 unstable metrics.
|
|
Based on all the failure I presume there's no |
There isn't unfortunately, I'll have to take some time to fix those. |
b031959 to
12fed34
Compare
🎉 All green!🧪 All tests passed 🔗 Commit SHA: c559ab5 | Docs | Datadog PR Page | Give us feedback! |
5b24355 to
49bb962
Compare
There was a weird edge case with LLMObs, will have to look into that before merging, but otherwise it should be mostly complete! |
49bb962 to
12862ed
Compare
|
This needs a rebase 😅 @rochdev |
12862ed to
fa22db1
Compare
| assert.deepStrictEqual(formatOutputMessages(response, true), [{ role: 'assistant', content: 'Hello, world!' }]) | ||
| }) | ||
| }) | ||
| }) |
There was a problem hiding this comment.
I am unsure in what way this landed here. I will check if that came in accidentially through a rebase
There was a problem hiding this comment.
We changed a indentation of some code without a test. That is covering that line.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1954120ca2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
1954120 to
3129fb4
Compare
This adds an editorconfig check to CI plus an `.editorconfig-checker.json` ignore list for binary fixtures and recorded cassettes. The check runs through the `mstruebing/editorconfig-checker` Docker image rather than the npm binary so CI does not fetch the checker binary over the network on every run.
Bring existing files into compliance with the editorconfig rules enforced by the new check. Whitespace only: final newlines, LF line endings, trailing whitespace, tabs converted to spaces, and indentation aligned to a multiple of two.
The editorconfig normalization appended a final newline to the streamtest fixture, which response_blocking.spec.js streams verbatim and asserts equals 'writefileend'. The extra byte made the streamed body 'writefile\nend' and failed the no-attack case. Restore the fixture and carve it out of the final-newline rule, matching the existing fine-tune.jsonl exclusion.
bad-formatted-rules.json is an intentional test fixture containing trailing whitespace to trigger bad-format parsing. The normalize commit removed it; exclude the file from editorconfig-checker instead and restore the original content. 1. Restore bad-formatted-rules.json and add it to the exclude list. 2. Remove EndOfLine, InsertFinalNewline, and TrimTrailingWhitespace from the Disable section — listing them as false is redundant with the default behavior when IgnoreDefaults is false. 3. Replace the untagged mstruebing/editorconfig-checker docker image in the CI job and npm script with the locked npm devDependency so the checker version is pinned by yarn.lock.
The Disable section was entirely a no-op — every entry was false, which is the default when IgnoreDefaults is false. Remove it so the config matches observable behavior. Exclude patterns were unanchored regexes, causing "vendor" to silence .github/vendored-dependencies.csv, which has CRLF line endings. Anchor all patterns, fix the CRLF in that file, and add .nyc_output/ and coverage/ to guard against local false positives from coverage artifacts.
The `extractMetrics` token fallback (derive the total from prompt + candidate counts when `totalTokenCount` is absent) and the streaming special-case branch in `formatOutputMessages` (functionCall / executableCode / codeExecutionResult parts routed through non-streaming formatting) had no direct coverage. Add a unit spec pinning both branches and their token-count siblings.
43df1ad to
c559ab5
Compare
* ci: add editorconfig validation to linting This adds an editorconfig check to CI plus an `.editorconfig-checker.json` ignore list for binary fixtures and recorded cassettes. The check runs through the `mstruebing/editorconfig-checker` Docker image rather than the npm binary so CI does not fetch the checker binary over the network on every run. * style: normalize files to satisfy editorconfig Bring existing files into compliance with the editorconfig rules enforced by the new check. Whitespace only: final newlines, LF line endings, trailing whitespace, tabs converted to spaces, and indentation aligned to a multiple of two. * fix(test): keep streamtest fixture free of a trailing newline The editorconfig normalization appended a final newline to the streamtest fixture, which response_blocking.spec.js streams verbatim and asserts equals 'writefileend'. The extra byte made the streamed body 'writefile\nend' and failed the no-attack case. Restore the fixture and carve it out of the final-newline rule, matching the existing fine-tune.jsonl exclusion. * test(llmobs): cover google-genai metrics and streaming output formatting The `extractMetrics` token fallback (derive the total from prompt + candidate counts when `totalTokenCount` is absent) and the streaming special-case branch in `formatOutputMessages` (functionCall / executableCode / codeExecutionResult parts routed through non-streaming formatting) had no direct coverage. Add a unit spec pinning both branches and their token-count siblings. --------- Co-authored-by: Ruben Bridgewater <ruben.bridgewater@datadoghq.com>
* ci: add editorconfig validation to linting This adds an editorconfig check to CI plus an `.editorconfig-checker.json` ignore list for binary fixtures and recorded cassettes. The check runs through the `mstruebing/editorconfig-checker` Docker image rather than the npm binary so CI does not fetch the checker binary over the network on every run. * style: normalize files to satisfy editorconfig Bring existing files into compliance with the editorconfig rules enforced by the new check. Whitespace only: final newlines, LF line endings, trailing whitespace, tabs converted to spaces, and indentation aligned to a multiple of two. * fix(test): keep streamtest fixture free of a trailing newline The editorconfig normalization appended a final newline to the streamtest fixture, which response_blocking.spec.js streams verbatim and asserts equals 'writefileend'. The extra byte made the streamed body 'writefile\nend' and failed the no-attack case. Restore the fixture and carve it out of the final-newline rule, matching the existing fine-tune.jsonl exclusion. * test(llmobs): cover google-genai metrics and streaming output formatting The `extractMetrics` token fallback (derive the total from prompt + candidate counts when `totalTokenCount` is absent) and the streaming special-case branch in `formatOutputMessages` (functionCall / executableCode / codeExecutionResult parts routed through non-streaming formatting) had no direct coverage. Add a unit spec pinning both branches and their token-count siblings. --------- Co-authored-by: Ruben Bridgewater <ruben.bridgewater@datadoghq.com>
What does this PR do?
Add editorconfig validation to linting.
Motivation
These rules are not currently enforced unless the extension is used and a specific file is touched.
Additional Notes