Replace with an underscore any non alphanumerical character. This will ensure that paths like /src/foo-bar/baz.h doesn't generate an invalid include guard.
Details
Details
- Reviewers
sdulfari - Group Reviewers
Restricted Project - Commits
- rABC355d6d48e429: [linter] Sanitize the headers include guard
Create a directory in src with some non alphanum char, and a header.h file in that directory. Check the linter returns a sanitizer include guard.
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
arcanist/linter/IncludeGuardLinter.php | ||
---|---|---|
66 ↗ | (On Diff #34539) | I'm unsure of the impact of not having underscore in the exclusion list, so I have to ask if it's worth adding? |
arcanist/linter/IncludeGuardLinter.php | ||
---|---|---|
66 ↗ | (On Diff #34539) | That means that an underscore will get replaced by an underscore, so it's completely the same but with a simpler regex. |