You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NUTCH-3215 Remove trailing whitespace reported by Yetus blanks on master - #974
This PR addresses the remainder of NUTCH-3215. The first pull request only removed trailing spaces. Yetus treats "end in blanks" as any trailing space or tab, and it has a second, separate vote for tab characters anywhere in a line. Both of those were still present after #971 merged.
Whilst I was looking at this, I was curious about whether the Eclipse profile in eclipse-codeformat.xml and Yetus agreed/disagreed on anything.The Eclipse profile sets tabulation.char to space, with both tabulation.size and indentation.size at 2. Yetus blanks fails a file that contains a tab character, or a line that ends in a space or a tab. A Java file formatted with that profile satisfies both of those checks. Yetus does not care that the indent is 2 rather than 4, and it does not apply the Eclipse line length of 80.
Two limits keep them from being the same convention:
The Eclipse profile formats Java only. Yetus blanks scans the whole tree, including XML, HTML, shell scripts, and properties files. Those files are aligned with Yetus only if they also use spaces and have no trailing blanks. The tab-delimited data files listed in .yetus/blanks-tabs.txt are an intentional exception.
Because .yetus/blanks-tabs.txt exists, Yetus uses that file instead of its built-in exceptions for Makefiles and Go. This repository does not list those patterns. A Makefile that uses tabs for recipes would fail Yetus even though that is normal Make, and the Eclipse profile would not touch it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the remainder of NUTCH-3215. The first pull request only removed trailing spaces. Yetus treats "end in blanks" as any trailing space or tab, and it has a second, separate vote for tab characters anywhere in a line. Both of those were still present after #971 merged.
Whilst I was looking at this, I was curious about whether the Eclipse profile in
eclipse-codeformat.xmland Yetus agreed/disagreed on anything.The Eclipse profile setstabulation.charto space, with bothtabulation.sizeandindentation.sizeat2. Yetus blanks fails a file that contains a tab character, or a line that ends in a space or a tab. A Java file formatted with that profile satisfies both of those checks. Yetus does not care that the indent is 2 rather than 4, and it does not apply the Eclipse line length of 80.Two limits keep them from being the same convention:
After running Yetus locally everything checks out