update editorconfig, enforce via CI (#1343)
* update editorconfig to set unix-style newlines and trim whitespace * add editorconfig github action to the CI * fix whitespacepull/1379/head
parent
c2b82ea8ac
commit
da2efecbe2
|
@ -1,4 +1,16 @@
|
|||
# 2 space indentation
|
||||
# Top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file, utf-8 charset
|
||||
[*]
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# ignore binary files
|
||||
[{*.hwx,*.mlmodel,*.weights,*.golden}]
|
||||
end_of_line = unset
|
||||
trim_trailing_whitespace = unset
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
name: EditorConfig Checker
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
editorconfig:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
- run: editorconfig-checker
|
|
@ -69,6 +69,5 @@ int main(int argc, char* argv[]) {
|
|||
int ret = ANECCompile(optionsDictionary, flagsDictionary, 0);
|
||||
printf("compile: %d\n", ret);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -74,4 +74,3 @@ class TestYOLOv8(unittest.TestCase):
|
|||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
@ -102,5 +102,6 @@ class TestUtils(unittest.TestCase):
|
|||
assert a.shape == b.shape
|
||||
assert a.dtype == b.dtype
|
||||
assert np.array_equal(a, b)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Loading…
Reference in New Issue