Skip to content
Permalink
Browse files

Fix alpha updates and lint error reporting (PR #10020)

- Fix NVDA exe upload location
  - When the artifacts are uploaded, they need to preserve the folder structure.
- Fix failure to upload lint errors to unit test results
  - Decoding as UTF-8 was not working for lint output, use ANSI and replace on error instead.
- Changes to config of Flake8
  - Particularly flake8-tabs settings and its overlap with pycodestyle
  • Loading branch information...
feerrenrut committed Aug 2, 2019
1 parent 2989b57 commit 7b5cd2d09c227051a9bc7162740e24108cae6322
Showing with 24 additions and 9 deletions.
  1. +9 −2 appveyor.yml
  2. +2 −2 tests/lint/createJunitReport.py
  3. +13 −5 tests/lint/flake8.ini
@@ -196,8 +196,15 @@ test_script:
on_finish:
- ps: |
Get-ChildItem output\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
Get-ChildItem output\*\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
$uploadFromFolder = "output\"
if( Test-Path $uploadFromFolder ){
$root = Resolve-Path .\
$output = Resolve-Path $uploadFromFolder
$paths = [IO.Directory]::GetFiles($output.Path, '*.*', 'AllDirectories')
$paths | % {
Push-AppveyorArtifact $_ -FileName $_.Substring($root.Path.Length + 1)
}
}
deploy_script:
- ps: |
@@ -30,7 +30,7 @@


def makeJunitXML(inFileName, outFileName):
with open(inFileName, 'rt', encoding='UTF-8') as flake8In:
with open(inFileName, 'rt', encoding='ANSI', errors='replace') as flake8In:
errorText = flake8In.read()
if len(errorText) > 0:
# make "with error" xml content
@@ -39,7 +39,7 @@ def makeJunitXML(inFileName, outFileName):
# make "no error" xml content
outContents = NO_ERROR

with open(outFileName, 'wt', encoding='UTF-8') as out:
with open(outFileName, 'wt', encoding='UTF-8', errors='replace') as out:
out.write(outContents)


@@ -2,6 +2,7 @@

# Plugins
use-flake8-tabs = True
# Not all checks are replaced by flake8-tabs, we decide manually in the ignore section.
use-pycodestyle-indent = True

# Reporting
@@ -12,13 +13,20 @@ show-source = True
# Options
max-complexity = 15
max-line-length = 110
hang-closing = True
# Final bracket should match indentation of the start of the line of the opening bracket
hang-closing = False

ignore =
W191, # indentation contains tabs
E126, # continuation line over-indented for hanging indent
E133, # closing bracket is missing indentation
W503, # line break before binary operator. As opposed to W504 (line break after binary operator) which we want to check for.
W191, # indentation contains tabs
W503, # line break before binary operator. We want W504(line break after binary operator)
### The following are replaced by flake8-tabs plugin, reported as ET codes rather than E codes.
E121, E122, E123, E126, E127, E128,
### The following are not replaced by flake8-tabs: ###
E124, # Disable, requires mixing spaces and tabs: Closing bracket does not match visual indentation.
#E125, # Enable: Continuation line with same indent as next logical line
E129, # Disable, requires mixing spaces and tabs: Visually indented line with same indent as next logical line
E131, # Disable, requires mixing spaces and tabs: Continuation line unaligned for hanging indent
E133, # Disable, our preference handled by ET126: Closing bracket is missing indentation

builtins = # inform flake8 about functions we consider built-in.
_, # translation lookup

0 comments on commit 7b5cd2d

Please sign in to comment.
You can’t perform that action at this time.