WSC001: Bad line ending¶
This rule enforces Linux style (\n
) line ending, and alerting for Windows (\r\n
) and Osx (\r
) style.
Example¶
Input file: examples/WSC001_bad_eol.py
class LabelPrinter:
def __generate_pdf(self):
pdf_generator = _LabelPdfGenerator()
pdf_generator.generate_label(
self.__title, self.__data, self.__logo_path, config.App.LABEL_BORDER,
output_path=self.__pdf_path)
Command:
$ wscheck 'examples/WSC001_bad_eol.py'
In examples/WSC001_bad_eol.py line 3:
pdf_generator = _LabelPdfGenerator()
^-- WSC001: Bad line ending '\r\n'
In examples/WSC001_bad_eol.py line 5:
self.__title, self.__data, self.__logo_path, config.App.LABEL_BORDER,
^-- WSC001: Bad line ending '\r'