1
0
Fork 0

update editorconfig, enforce via CI (#1343)

* update editorconfig to set unix-style newlines and trim whitespace

* add editorconfig github action to the CI

* fix whitespace
pull/1379/head
Pavol Rusnak 2023-07-31 03:44:30 +02:00 committed by GitHub
parent c2b82ea8ac
commit da2efecbe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 182 additions and 158 deletions

View File

@ -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

View File

@ -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

View File

@ -69,6 +69,5 @@ int main(int argc, char* argv[]) {
int ret = ANECCompile(optionsDictionary, flagsDictionary, 0);
printf("compile: %d\n", ret);
return ret;
}

View File

@ -74,4 +74,3 @@ class TestYOLOv8(unittest.TestCase):
if __name__ == '__main__':
unittest.main()

View File

@ -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()