pkgcheck.checks.whitespace module¶
Various whitespace-related checks.
- class pkgcheck.checks.whitespace.BadWhitespaceCharacter(char, position, **kwargs)[source]¶
Bases:
LineResult,WarningEbuild uses whitespace that isn’t a tab, newline, or single space.
Bash does not treat unicode whitespace characters as regular whitespace so commands or operators separated by such characters will be treated as one string. This usually causes execution errors if the characters are used for separation purposes outside of comments or regular strings.
- property desc¶
Result description.
- name = 'BadWhitespaceCharacter'¶
- class pkgcheck.checks.whitespace.DoubleEmptyLine(lines, *args, **kwargs)[source]¶
Bases:
_WhitespaceUnneeded blank lines found.
- property desc¶
Result description.
- name = 'DoubleEmptyLine'¶
- class pkgcheck.checks.whitespace.MissingEAPIBlankLine(pkg, **kwargs)[source]¶
Bases:
VersionResult,StyleMissing blank line after
EAPI=assignment.- desc = 'missing blank line after EAPI= assignment'¶
- name = 'MissingEAPIBlankLine'¶
- class pkgcheck.checks.whitespace.MissingWhitespaceCheck(options, **kwargs)[source]¶
Bases:
OptionalCheckScan ebuild for missing whitespace.
- known_results = frozenset({<class 'pkgcheck.checks.whitespace.MissingEAPIBlankLine'>})¶
- scope = <PackageScope desc='version' @0x7f764341d220>¶
- class pkgcheck.checks.whitespace.NoFinalNewline(pkg, **kwargs)[source]¶
Bases:
VersionResult,StyleEbuild’s last line does not have a final newline.
- desc = 'ebuild lacks an ending newline'¶
- name = 'NoFinalNewline'¶
- class pkgcheck.checks.whitespace.TrailingEmptyLine(pkg, **kwargs)[source]¶
Bases:
VersionResult,StyleUnneeded trailing blank lines found.
- desc = 'ebuild has trailing blank line(s)'¶
- name = 'TrailingEmptyLine'¶
- class pkgcheck.checks.whitespace.WhitespaceCheck(*args)[source]¶
Bases:
CheckScan ebuild for useless whitespace.
- known_results = frozenset({<class 'pkgcheck.checks.whitespace.BadWhitespaceCharacter'>, <class 'pkgcheck.checks.whitespace.DoubleEmptyLine'>, <class 'pkgcheck.checks.whitespace.NoFinalNewline'>, <class 'pkgcheck.checks.whitespace.TrailingEmptyLine'>, <class 'pkgcheck.checks.whitespace.WhitespaceFound'>, <class 'pkgcheck.checks.whitespace.WrongIndentFound'>})¶
- scope = <PackageScope desc='version' @0x7f764341d220>¶
- class pkgcheck.checks.whitespace.WhitespaceData(unicode_version: str, chars: tuple)[source]¶
Bases:
NamedTupleData format to register hardcoded list of bad whitespace characters.