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
- Branch
- linter_sanitizer_include_guard
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 19742 Build 39203: Build Diff Build 39202: arc lint + arc unit
Event Timeline
arcanist/linter/IncludeGuardLinter.php | ||
---|---|---|
66 | 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 | That means that an underscore will get replaced by an underscore, so it's completely the same but with a simpler regex. |