File: runStyleCheck.ps1

package info (click to toggle)
azure-devops-cli-extension 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,384 kB
  • sloc: python: 160,782; xml: 198; makefile: 56; sh: 51
file content (31 lines) | stat: -rw-r--r-- 610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$failure = $false             

Write-Output "Installing pylint"
pip install pylint==3.0.3

Write-Output "Installing flake8"
pip install flake8

Write-Output "Running pylint on all source"
pylint --rcfile pylintrc ./azure-devops/azext_devops -f colorized

if ($LastExitCode -ne 0) {
    $failure = $true
    Write-Output "Pylint NOT OK!"
  } else {
    Write-Output "Pylint OK!"
  }

Write-Output "Running flake8 checks"
flake8 --config .flake8

if ($LastExitCode -ne 0) {
    $failure = $true
    Write-Output "flake8 NOT OK!"
  } else {
    Write-Output "flake8 OK!"
  }

if($failure -eq $true){
    exit 1
}