[pull] master from GaijinEntertainment:master#983
Merged
Conversation
…weep
Three layers of lint cleanup that landed together:
1. LINT001 false-positive in daslib/lint.das. Braceless `if (cond) <terminator>`
(the form STYLE005 actively asks for) triggered a false LINT001 on the next
sibling statement. The visitor's preVisitExprReturn / preVisitExprCall(panic)
wrote the return's pointer onto the enclosing block's slot whenever ANY
return/panic was walked — which poisoned the outer block when the return
was nested inside an ExprIf body that has no surrounding ExprBlock (the AST
shape for `if (cond) return X`). Move the terminator tracking into
visitExprBlockExpression so only DIRECT block children mark their enclosing
block. Resolves the LINT001 hits in daslib/json_boost.das that surfaced
after STYLE005 rewrote `} elif (cond) { return X }` to
`} elif (cond) return X`. lint.das own STYLE016/STYLE005 warnings cleaned up
alongside.
2. utils/fix-lint-errors improvements. is_simple_subject now peels
ExprRef2Value (a typer artifact), so PERF017 fires on field-access subjects
like `length(blk.list) == 0` whose AST wraps the receiver in Ref2Value —
was silently skipping ~60 daslib hits. preVisitFunction's in_template gate
drops isTemplate and macroFunction (those bodies are user-written daslang
with reliable .at); only flags.generated stays skipped, the documented
struct-annotation corruption case from utils/daspkg/commands.das. Post-
rewrite try_compile verification continues to catch any edge case.
3. daslib + dastest sweep, 408 -> 0 lint issues.
- dastest/testing.das: 16 STYLE005 in equal/success, 2 STYLE016 NaN guards
in numericEqual float/double, 2 LINT002 rename unused `i` to `_i` in
benchmark loops. (Cross-module STYLE005 leaks into every test_* file
until dastest itself is clean.)
- 174 empty `//` trailing markers stripped from daslib/perf_lint.das (78)
and daslib/style_lint.das (96), leftover noise that was blocking the
fixer's text-extraction sanity check.
- Auto-fixer sweep on daslib: ~190 mechanical rewrites across ~30 files.
Mostly STYLE005 in perf_lint/style_lint, PERF017 in ast_match, rst,
decs_boost, contracts, is_local, spoof, and others.
- Hand-finish on the long tail (~234 -> 0): STYLE016 adjacent-guard merges
across rst/ast_boost/ast_match/das_source_formatter/fio/clargs/coverage/
interfaces/jobque_boost/aot_cpp/fts5_query/profiler/utf8_utils/
validate_code/linq_boost; PERF014 nolint markers on regex char-class
primitives; PERF015 ternary -> min/max with `require math`; PERF006
reserve-before-push in bitfield_trait/delegate/match/templates_boost;
PERF007 `string(das_string)` strips in ast.das, perf_lint, style_lint;
STYLE017 collapses in aot_cpp/typemacro_boost/jobque_boost/ast_match;
STYLE013 named-arg ctor in perf_lint; builtin.das `find_index` /
`find_index_if` / `has_value` / `sort` one-line guards (the
cross-module STYLE005 instantiation sources).
- modules/dasPEG/peg/parse_macro.das: STYLE011 single-line move-init.
Net: 51 files (excluding the LINT001 fix), 312 insertions / 399 deletions.
daslib lint: 408 -> 0.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…finish lint: fix LINT001 false-positive, improve auto-fixer, finish daslib sweep (408 → 0)
missing mouse stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )