How to go about ignoring empty lines in the gerrit Diff View?
I have already turned the "Ignore Whitespace" to "All" in the Diff Preferences but I would like to hide added or removed empty lines in the Side by Side new change screen:
This is not possible in Gerrit.
Everything about Gerrit's diff screen that can be customized is listed here, nothing about empty lines is mentioned. Neither is it anywhere else in the settings.
I thought it might be possible if you were to edit Gerrit's diff script, but from the looks of it that is not a viable way either. If you search for "git diff ignore empty lines" you'll find about zero useful hits.
There is however this unofficial project that makes it possible to ignore empty lines that are not close to important changes, so even if you were to somehow edit the way Gerrit handles diffs, that wouldn't really do what you want.
Related
We've just turned on CodeClimate for our PRs, and have a ton of refactoring to do, but it's making our PR's fail for lines of code that weren't touched.
i.e. if I modify anywhere in a file, it will analyze every line in said file.
Is there a way to stop this behaviour?
Codeclimate is not able to detect changed code only.
This is one of the reasons I made my own linter:
https://gitlab.com/billyan2018/lite-linter
we are using Jenkins LTS 2.150.1, Is it possible to hide the nodes/slaves list (by default at the lower left side of the screen) from "regular" users (i.e - not admins).
Is it even possible?
Am I missing something?
I tried:
looking in the configuration of the server, couldn't find any "switch" or anything of that sort to hide it.
looking for a plugin to do that, but couldn't find anything that isn't changing the entire "look and feel" of the basic jenkins theme.
Seems to be that this feature is not added yet. See this ticket.
I am using Visual Studio Code on my Ubuntu box and when I checked in my code into BitBucket, somehow they are in different alignment, see below.
What would have caused this and how to I rectify this?
Your code almost certainly contains both tabs and spaces for indentation.
When this happens, almost any difference in how tabs are rendered will lead to anomalies such as you've shown above--code that looks right in one rendering looks all wrong in another.
Most code editors include ways to convert the entire file to using either spaces or tabs, but not a combination of the two. Using only spaces probably does the most to guarantee that the code will look the same, regardless of the environment.
On the other hand, using only tabs means that each user will probably see the code as s/he normally views code (at least assuming s/he has his/her environment set up to deal with tabs). For example, if the code is indented with tabs, and you like indentation to be by 8 spaces, but I prefer 4 spaces, each of us can get exactly that from identical source code (i.e., most editors will let us set the tab stops as we see fit).
Select the whole document or the line you have problem with,
Then go to Edit -> Advanced -> Tabify Selected Lines
That should fixed the issue. More info : https://blogs.msdn.microsoft.com/zainnab/2010/03/14/how-to-convert-tabs-to-spaces-and-vice-versa/
I am using Sublime Text 2 and it is great.
I use it to write html, css and ruby.
I have a problem when I edit my spec files, because it adds and removes blank lines in the whole file and makes the git log unreadable.
this is the git diff
Seems like your editor is configured to remove trailing whitespace and other developers in the team don't use that setting. Or vise versa. they remove whitespace and you don't.
Therefore I suggest to use the same settings in the whole team.
To enable or disable that feature, go to SublimeText 2 > Preferences > User Settings and add
"trim_trailing_white_space_on_save": true
or
"trim_trailing_white_space_on_save": false
to the configuration
Is there a way to remove selection when you use multy cursors. I mean when I use ctrl+d it expandes selection and ctrl+k, ctrl+d to skip selection works, but ctrl+u for removing selection is not working on windows. Is there another shortcut or some snippents to make it work?
It sounds like there is a plugin interfering with the CtrlU undo option. To find it, open the console with Ctrl` and enter the command
sublime.log_commands(True)
This shows what's going on behind the scenes when you press key combinations or use mouse buttons. Test it by making some multiple selections with CtrlD, and you should see
command: find_under_expand
in the console. Now, try to undo one of your selections by hitting CtrlU and see what comes up. If you see
command: soft_undo
then it's not another plugin issue, as that's what you'd expect to see. However, if (as I suspect) another plugin is interfering, you'll see something else there. If you do, hopefully you'll be able to trace it to the plugin it belongs to and disable it.
When you're done, enter
sublime.log_commands(False)
in the console to turn logging off, then close the console by hitting Esc or Ctrl`.