MCPcopy Create free account
hub / github.com/DFHack/dfhack / NewlineLinter

Class NewlineLinter

ci/lint.py:87–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86
87class NewlineLinter(Linter):
88 msg = 'Contains DOS-style newlines'
89 # git supports newline conversion. Catch in CI, ignore on Windows.
90 ignore = os.linesep != '\n' and not os.environ.get('CI')
91 def check_line(self, line):
92 return '\r' not in line
93 def fix_line(self, line):
94 return line.replace('\r', '')
95
96class TrailingWhitespaceLinter(Linter):
97 msg = 'Contains trailing whitespace'

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected