pkgcheck.checks.whitespace module¶
Various whitespace-related checks.
- class pkgcheck.checks.whitespace.BadWhitespaceCharacter(char, position, **kwargs)[source]¶
Bases:
LineResult
,Warning
Ebuild 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:
_Whitespace
Unneeded blank lines found.
- property desc¶
Result description.
- name = 'DoubleEmptyLine'¶
- class pkgcheck.checks.whitespace.MissingEAPIBlankLine(pkg, **kwargs)[source]¶
Bases:
VersionResult
,Style
Missing blank line after
EAPI=
assignment.- desc = 'missing blank line after EAPI= assignment'¶
- name = 'MissingEAPIBlankLine'¶
- class pkgcheck.checks.whitespace.MissingWhitespaceCheck(options, **kwargs)[source]¶
Bases:
OptionalCheck
Scan ebuild for missing whitespace.
- known_results = frozenset({<class 'pkgcheck.checks.whitespace.MissingEAPIBlankLine'>})¶
- scope = <PackageScope desc='version' @0x7fc9bedc9290>¶
- class pkgcheck.checks.whitespace.NoFinalNewline(pkg, **kwargs)[source]¶
Bases:
VersionResult
,Style
Ebuild’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
,Style
Unneeded trailing blank lines found.
- desc = 'ebuild has trailing blank line(s)'¶
- name = 'TrailingEmptyLine'¶
- class pkgcheck.checks.whitespace.WhitespaceCheck(*args)[source]¶
Bases:
Check
Scan 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' @0x7fc9bedc9290>¶
- class pkgcheck.checks.whitespace.WhitespaceData(unicode_version: str, chars: tuple)[source]¶
Bases:
NamedTuple
Data format to register hardcoded list of bad whitespace characters.