mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
Add basic qml linter config
This commit is contained in:
parent
2b1c9af311
commit
d0c43eb872
3 changed files with 77 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
FILES=$(find src -type f \( -iname "*.cpp" -o -iname "*.h" \))
|
FILES=$(find src -type f \( -iname "*.cpp" -o -iname "*.h" \))
|
||||||
|
QML_FILES=$(find resources/qml -type f \( -iname "*.qml" \))
|
||||||
|
|
||||||
for f in $FILES
|
for f in $FILES
|
||||||
do
|
do
|
||||||
|
@ -15,3 +16,11 @@ do
|
||||||
done;
|
done;
|
||||||
|
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
|
|
||||||
|
if command -v /usr/lib64/qt6/bin/qmllint &> /dev/null; then
|
||||||
|
/usr/lib64/qt6/bin/qmllint $QML_FILES
|
||||||
|
elif command -v /usr/lib/qt6/bin/qmllint &> /dev/null; then
|
||||||
|
/usr/lib/qt6/bin/qmllint $QML_FILES
|
||||||
|
else
|
||||||
|
echo "No qmllint found, skipping check!"
|
||||||
|
fi
|
||||||
|
|
|
@ -312,7 +312,7 @@ linting:
|
||||||
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest
|
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest
|
||||||
tags: [docker]
|
tags: [docker]
|
||||||
before_script:
|
before_script:
|
||||||
- apk update && apk add make git python3 py3-pip
|
- apk update && apk add make git python3 py3-pip qt6-qtdeclarative-dev
|
||||||
- apk add clang-extra-tools --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
- apk add clang-extra-tools --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||||
- export PATH="$PATH:/root/.local/bin"
|
- export PATH="$PATH:/root/.local/bin"
|
||||||
- pip3 install --user reuse
|
- pip3 install --user reuse
|
||||||
|
|
67
.qmllint.ini
Normal file
67
.qmllint.ini
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
[General]
|
||||||
|
AdditionalQmlImportPaths=
|
||||||
|
DisableDefaultImports=false
|
||||||
|
DisablePlugins=
|
||||||
|
OverwriteImportTypes=
|
||||||
|
ResourcePath=
|
||||||
|
|
||||||
|
[Warnings]
|
||||||
|
#AccessSingletonViaObject=warning
|
||||||
|
#AttachedPropertyReuse=disable
|
||||||
|
#BadSignalHandlerParameters=warning
|
||||||
|
#CompilerWarnings=disable
|
||||||
|
#Deprecated=warning
|
||||||
|
#DuplicatePropertyBinding=warning
|
||||||
|
#DuplicatedName=warning
|
||||||
|
#ImportFailure=warning
|
||||||
|
#IncompatibleType=warning
|
||||||
|
#InheritanceCycle=warning
|
||||||
|
#InvalidLintDirective=warning
|
||||||
|
#LintPluginWarnings=disable
|
||||||
|
#MissingProperty=warning
|
||||||
|
#MissingType=warning
|
||||||
|
#MultilineStrings=info
|
||||||
|
#NonListProperty=warning
|
||||||
|
#PrefixedImportType=warning
|
||||||
|
#PropertyAliasCycles=warning
|
||||||
|
#ReadOnlyProperty=warning
|
||||||
|
#RequiredProperty=warning
|
||||||
|
#RestrictedType=warning
|
||||||
|
#TopLevelComponent=warning
|
||||||
|
#UncreatableType=warning
|
||||||
|
#UnqualifiedAccess=warning
|
||||||
|
#UnresolvedType=warning
|
||||||
|
#UnusedImports=info
|
||||||
|
#UseProperFunction=warning
|
||||||
|
#VarUsedBeforeDeclaration=warning
|
||||||
|
#WithStatement=warning
|
||||||
|
|
||||||
|
AccessSingletonViaObject=disable
|
||||||
|
AttachedPropertyReuse=disable
|
||||||
|
BadSignalHandlerParameters=disable
|
||||||
|
CompilerWarnings=disable
|
||||||
|
Deprecated=disable
|
||||||
|
DuplicatePropertyBinding=disable
|
||||||
|
DuplicatedName=disable
|
||||||
|
ImportFailure=disable
|
||||||
|
IncompatibleType=disable
|
||||||
|
InheritanceCycle=disable
|
||||||
|
InvalidLintDirective=disable
|
||||||
|
LintPluginWarnings=disable
|
||||||
|
MissingProperty=disable
|
||||||
|
MissingType=disable
|
||||||
|
MultilineStrings=info
|
||||||
|
NonListProperty=disable
|
||||||
|
PrefixedImportType=disable
|
||||||
|
PropertyAliasCycles=disable
|
||||||
|
ReadOnlyProperty=disable
|
||||||
|
RequiredProperty=disable
|
||||||
|
RestrictedType=disable
|
||||||
|
TopLevelComponent=disable
|
||||||
|
UncreatableType=disable
|
||||||
|
UnqualifiedAccess=disable
|
||||||
|
UnresolvedType=disable
|
||||||
|
UnusedImports=info
|
||||||
|
UseProperFunction=disable
|
||||||
|
VarUsedBeforeDeclaration=disable
|
||||||
|
WithStatement=disable
|
Loading…
Reference in a new issue