

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
-
34
Fixing Unix/Linux/POSIX Filenames: Control Characters (such as Newline), Leading Dashes, and Other Problems David A. Wheeler 2018-06-24 (originally 2009-03-24)
-
21
Quick Tip - Strip Empty Lines Out Of A File Here’s a quick one-liner that will remove all of the blank lines from a file. get-content $PathToInput | % { if (-not [string]::IsNullOrWhiteSpace($_)...
-
6
Newline From Wikipedia, the free encyclopedia Jump to navigation Jump to search...
-
5
拥抱视频会议新变革,newline TC65成为小团体会议最佳选择 随着科技和社会节奏的快速转变,如何开好会、使开会变的更高效成为各企业关注的焦点,全球会议...
-
8
Make your JSON API tests clean with linterHi, weʼre arkency 👋 Recently, one of our customers requested that mobile devices should communicate with backend via
-
6
Copy link melkster commented
-
19
In this article, we will discuss different ways to remove all newline characters from a string in C++. The new line characters can be ‘\n’ or ‘\r’. Table of Characters Remove Newline characters from String using Regex
-
4
Not FoundYou just hit a route that doesn't exist... the sadness.LoginRadius empowers businesses to deliver a delightful customer experience and win customer trust. Using the LoginRadius Identity...
-
5
In this article, we will discuss different ways to delete all newline characters from a string in Python. Table of Contents Remove newline characters from string using Regex In Python, the regex module...
-
12
Sublime Text: Remove Empty Lines If you try to figure out how to remove the blank lines in a document, i.e. the lines that contain only spaces, tabs or the newline characters, you should know that in almost any...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK