lint: All text files for general formatting#15641
lint: All text files for general formatting#15641mattklein123 merged 4 commits intoenvoyproxy:mainfrom
Conversation
|
this is a first attempt at a script to cleanup text/code files in the repo that have language-independent linting issues so far it does not:
|
|
just looking at autofix - to automate |
|
re untabify - this situation is made worse as my vote is defo to use 4-space indents but im struggling to find anything (reliable) that will properly lint indents in shell scripts (no matter what the number of spaces is) |
|
@phlax I'd probably prefer Python here TBH. Bash becomes hard to write if we want to extend it. |
|
ill have a look at reimplementing in python. my concern is that it will make it much slower and probs require quite a bit more code. Also some of the things (like finding the text files) are going to be much harder to implement in python (bash still has some uses 8/) so we may end up with the ~same bash lines just wrapped in python |
|
I think |
its not the globbing thats the issue - its easy enough to find and filter files - this is using git to filter what it sees as a "text" file |
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
cf3524e to
65ee3b1
Compare
davinci26
left a comment
There was a problem hiding this comment.
+1 to write it with python because it would help with having cross platform tooling
apologies - the conversation continued in slack - and for the reason that bash really is the best tool for these it has been done this way for now using python would add a huge amount of complexity and depending on how much complexity was added would potentially be a lot slower |
|
also at very least (without a lot of working around) it would need to include a git |
|
@mattklein123 this should be ready for final review hopefully i have excluded all of the current exclude is NOLINT_RE="\.patch$|^test/.*_corpus/|^tools/.*_corpus/|password_protected_password.txt" |
|
/retest |
|
Retrying Azure Pipelines: |
mattklein123
left a comment
There was a problem hiding this comment.
Very nice, thanks. Just some small comments.
/wait
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey ryan@synca.io
Commit Message: lint: All text files for general formatting
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] Fix #15442
[Optional Deprecated:]
[Optional API Considerations:]