Make whitespace / newline linter also fail for extra empty lines at the end of f...
source link: https://bugzilla.mozilla.org/show_bug.cgi?id=1675131
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Make whitespace / newline linter also fail for extra empty lines at the end of files (\n\n$ => \n$)
Categories
(Firefox Build System :: Lint and Formatting, task, P3)
Tracking
(firefox86 fixed)
86 Branch
People
(Reporter: Gijs, Assigned: ikartikgautam, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=python])
As in summary. This is catching people out for l10n files, and it should really be a standard for all our other code files, too.
The severity field is not set for this bug.
:ahal, could you have a look please?
For more information, please visit auto_nag documentation.
I am very new to contributing to mozilla. Sir can you please guide me on how should i approach this issue and fix it. I think i can fix this issue. I just need your help. I tried to figure out myself fixing this issue, but unfortunately i failed, hence require your help.
Thank You,
Kartik Gautam
Sure, how can I help you? Please be specific in your request! :)
Cheers
Sir, i am working on it, i just have one question am i required to only make linter fail for missing empty lines at the end of files or after failing it should also fix the error ?
Thank You,
Kartik Gautam
Good question.
First, you can do a first change which will detect this.
Then, you could indeed in the future fix it but it doesn't have to in the v1 :)
(In reply to Sylvestre Ledru [:Sylvestre] from comment #6)
Good question.
First, you can do a first change which will detect this.Then, you could indeed in the future fix it but it doesn't have to in the v1 :)
Sir, I have made the changes, Should i add you as reviewer? Also i am a little unsure about the error messages, please take a look at them too.
Sorry, i think i have done something wrong while submitting for review, i don’t know why it submitted my earlier contribution too. and here it commented "Depends on D97943". Can you please suggest me, what should i do ?
I removed the dependency for you (before seeing your message).
This patch and bug 1680556 are backward: the linter should fail if a file doesn't have an empty line at the end, not the other way around.
(In reply to Francesco Lodolo [:flod] from comment #12)
This patch and bug 1680556 are backward: the linter should fail if a file doesn't have an empty line at the end, not the other way around.
So does it mean that it should only give error if file does not have empty lines at end ? be it any number of of empty lines ?
Right now it checks for if file have any extra empty line at end of file.
Kartik, please continue to work on it. It is great :)
I replied in the reviews with details
Currently, you are working on:
----
mycode\n
\n
----
to be replaced by:
----
mycode\n
----
We will open a different bug for the second thing which is:
----
mycode
----
to be replaced by:
----
mycode\n
----
Pushed by [email protected]: https://hg.mozilla.org/integration/autoland/rev/eb1260476732 Make whitespace / newline linter also fail for missing empty lines at the end of files. r=sylvestre DONTBUILD
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK