feat[linter]: experimental name check on push

this will check signal names based on the `.fff-ir-lint.json` file in the root.
naming suggestions should be viewed critically and are more of a recommendation than a guideline.
main^2
Daniel 2023-08-20 13:39:32 +02:00 committed by GitHub
commit c0e402540e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 73 additions and 1 deletions

72
.fff-ir-lint.json 100644
View File

@ -0,0 +1,72 @@
{
"name-check": {
"$path-prefix": "",
"$groups": {
"power": [
"power",
"pwr",
"/^((power|pwr)[_\\s]*)?(toggle|on|off)$/",
"/^(turn[_\\s]*)?(on|off)$/"
],
"vol_up": [
"/^vol(ume)?[_\\s]*(up|[\\^+])$/"
],
"vol_dn": [
"/^vol(ume)?[_\\s]*(d(o?w)?n|[v\\-])$/"
],
"ch_next": [
"/^ch(an(nel)?)?[_\\s]*(up|[\\^+])$/"
],
"ch_prev": [
"/^ch(an(nel)?)?[_\\s]*(d(o?w)?n|[\\v-])$/"
],
"mute": [
"mute",
"mte",
"/^mute.*$/"
]
},
"TVs/*": {
"Power": [
"$group:power",
"off",
"on"
],
"Vol_up": [
"$group:vol_up"
],
"Vol_dn": [
"$group:vol_dn"
],
"Ch_next": [
"$group:ch_next"
],
"Ch_prev": [
"$group:ch_prev"
],
"Mute": [
"$group:mute"
]
},
"ACs/*": {
"Off": [
"off",
"/^((power|pwr)[_\\s]*)?off$/"
]
},
"Audio_Receivers/*,SoundBars/*,Speakers/*": {
"Power": [
"$group:power"
],
"Vol_up": [
"$group:vol_up"
],
"Vol_dn": [
"$group:vol_dn"
],
"Mute": [
"$group:mute"
]
}
}
}

View File

@ -44,7 +44,7 @@ jobs:
id: run
continue-on-error: true
with:
run: python fff-ir-lint/main.py github2 file:changed_file_list.txt
run: 'LINTER_CONFIG=.fff-ir-lint.json python fff-ir-lint/main.py github2 file:changed_file_list.txt'
- uses: ntsd/auto-request-changes-action@v2
name: "Request Changes"