diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ec73cc54b..f98718ea8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -260,7 +260,8 @@ stages: displayName: Code Style Compliance dependsOn: [] jobs: - - job: Linting + - job: Linting_Dotnet + displayName: Linting Dotnet pool: vmImage: ubuntu-latest workspace: @@ -298,6 +299,26 @@ stages: dotnet-format --dry-run --check --verbosity diagnostic --folder ./src/Jackett.Tray dotnet-format --dry-run --check --verbosity diagnostic --folder ./src/Jackett.Updater + - job: Linting_YAML + displayName: Linting YAML + pool: + vmImage: ubuntu-latest + workspace: + clean: all + steps: + - checkout: self + + - task: UsePythonVersion@0 + displayName: Install Python + inputs: + versionSpec: '3.8' + + - script: pip install yamllint + displayName: Install yamllint + + - script: yamllint -c ./yamllint.yml ./src/Jackett.Common/Definitions/ + displayName: Lint YAML + - stage: UnitTestJackett displayName: Unit Tests dependsOn: CodeStyle @@ -399,7 +420,9 @@ stages: - stage: Integration displayName: Integration Tests - dependsOn: BuildJackett + dependsOn: + - BuildJackett + - CodeStyle jobs: - job: Selenium workspace: diff --git a/yamllint.yml b/yamllint.yml new file mode 100644 index 000000000..0f1dcb941 --- /dev/null +++ b/yamllint.yml @@ -0,0 +1,16 @@ +--- +# +# doc https://yamllint.readthedocs.io/en/stable/ +# +# run in local (linux) +# install => sudo python3 -m pip install yamllint +# run => yamllint -s -c ./yamllint.yml ./src/Jackett.Common/Definitions/ +# +extends: default + +rules: + document-start: + level: error + line-length: disable + key-duplicates: disable + truthy: disable