Improve the behavior of ArcanistTextLinter in dealing with LINT_DOS_NEWLINE. In particular, provide replacement text so that these linter issues can be autofixed.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rARC888ada2f380c: Improve `LINT_DOS_NEWLINE` behavior
Added a unit test.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- arcpatch-D10472
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 2604 Build 2608: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
If the file has OS9 newlines (\r only), this will completely destroy them and mangle the file. We should only remove \r if the next character is \n.
Also, maybe it's better to emit one giant whole-file patch than one patch for each line?
Comment Actions
- Don't suggest a fix if the file has OS9 newlines
- Suggest one patch per file rather than one patch per line
Comment Actions
We could also suggest one patch per contiguous block of lines with bad newlines as an ideal behavior, but this should usually accomplish the same thing.