Skip to content

Commit

Permalink
Add lint rule for todo (#11141)
Browse files Browse the repository at this point in the history
* Add lint rule for todo

* Add some exclude rules for the todo bot

* Fix slash in todo config string

* Fix lint rule exit code

* Fix repeated TODO in CHIPOClientCallbacks.cpp

* zzz generated uses underscore not dash

* Revert python changes due to zap regen
  • Loading branch information
andy31415 authored and pull[bot] committed Jul 26, 2022
1 parent 98380c6 commit 3627611
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ todo:
autoAssign: true # string|string[]|boolean
label: ["todo"] # boolean|string|string[]
reopenClosed: true # boolean
exclude: ".*lint\\.yaml|.*/(zzz_generated|zap-generated)/.*" # string
5 changes: 5 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@ jobs:
- name: Check for incorrect error use in VerifyOrExit
run: |
git grep -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# Comments like '{{! ... }}' should be used in zap files
- name: Do not allow TODO in generated files
run: |
git grep -n 'TODO:' -- ./zzz_generated './*/zap-generated/*' && exit 1 || exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ namespace {
}


// TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of template.
// Singleton instance of the callbacks manager
{{! TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of template. }}

// Singleton instance of the callbacks manager
app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance();

{{#chip_client_clusters}}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3627611

Please sign in to comment.