Skip to content

Commit fa531bc

Browse files
committed
Merge remote-tracking branch 'origin/334_info_msg_count_in_error' into develop
2 parents bc92d17 + 252e461 commit fa531bc

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

src/attributecode/cmd.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,21 +381,24 @@ def check(location, verbose):
381381

382382
msg_format = '%(sever)s: %(message)s'
383383
print_errors = []
384+
number_of_errors = 0
384385
for severity, message in errors:
385386
sever = severities[severity]
387+
# Only problematic_errors should be counted.
388+
# Others such as INFO should not be counted as error.
389+
if sever in problematic_errors:
390+
number_of_errors = number_of_errors + 1
386391
if verbose:
387392
print_errors.append(msg_format % locals())
388393
elif sever in problematic_errors:
389394
print_errors.append(msg_format % locals())
390395

391-
number_of_errors = len(print_errors)
392-
393396
for err in print_errors:
394397
print(err)
395398

396399
if print_errors:
397400
click.echo('Found {} errors.'.format(number_of_errors))
398-
# FIXME: not sure this is the right way to exit with a retrun code
401+
# FIXME: not sure this is the right way to exit with a return code
399402
sys.exit(1)
400403
else:
401404
click.echo('No error found.')

thirdparty/base/idna.ABOUT

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ copyright: |
1414

1515
license_expression: bsd-new and python and unicode-data-software
1616

17-
license_file:
18-
- idna.LICENSE
19-
- PSF.LICENSE
20-
- unicode-data-software.LICENSE
17+
license_file: |
18+
idna.LICENSE
19+
PSF.LICENSE
20+
unicode-data-software.LICENSE
2121
notice_file: idna.NOTICE

thirdparty/base/packaging.ABOUT

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ owner: Python Packaging Authority
1010
copyright: Copyright (c) Donald Stufft and individual contributors.
1111

1212
license_expression: bsd-simplified or apache-2.0
13-
license_file:
14-
- apache-2.0.LICENSE
15-
- packaging.LICENSE
13+
license_file: |
14+
apache-2.0.LICENSE
15+
packaging.LICENSE
1616

1717
notice_file: packaging.NOTICE

0 commit comments

Comments
 (0)