All Questions
Tagged with code-formatting formatting
82
questions
-1
votes
1
answer
88
views
How do I configure prettier to not separate my attributes onto new lines and not separate my opening bracket and closing bracket?
Before I state any of my problems this is my .prettierrc file so far
{
"semi": true,
"useTabs": true,
"tabWidth": 4
}
Problem 1:
I would like my prettier to ...
0
votes
0
answers
66
views
Ctrl k+D not working on last microsft vs update
After last update of Microsoft VS ctrl K+D for format code not working for razor page although it format cs page
I tried to format form Edit-Advanced-format document but the code didn't format
Then i ...
0
votes
0
answers
42
views
How to re-format HTML (in vscode) to remove unnecessary line breaks after every tag
I know that most code formatters have config to prevent breaking on <b>, <i> etc tags, but I cannot figure out what to do if the disaster already happened and I want to go back from 1000 ...
4
votes
0
answers
447
views
Project-wide formatting options for `dart format`
I want to use dart format to format dart code, but my team uses custom format rules – such as line length of 120 characters and a few other things. Currently, code is formatted using settings in the ...
1
vote
1
answer
739
views
Android Studio formats Dart code differently than the dart format tool
Android Studio settings in Editor -> Code Style -> Dart state that:
Code is formatted using the dart format tool included with the Dart SDK. See FAQ.
But in some cases, it seems to be behave ...
5
votes
0
answers
366
views
How to format C++ code in Visual Studio using my own rules?
I am using Visual Studio 2019.
I want to create a setting file for Visual Studio which consists of my own formatting rules and anyone can import those settings for their Visual Studio. (I think this ...
0
votes
1
answer
896
views
C/C++ How to format if conditions' single statement on the same line in VScode
If you don't use curly braces in C/C++ after declaring a condition, the body of the function becomes the next statement directly after; same thing for loops (while, for etc....).
I want the formatter ...
0
votes
1
answer
86
views
Visual Studio 2019 - Multiple format settings
The code base I am working with uses a KNR formatting like this.
void foo(bool bar) {
if (bar) {
// do something
} else {
// do something else
}
}
I am generally not a fan ...
0
votes
1
answer
127
views
How to satisfy output line length, code line length and Black code formatting at the same time? I.e. textwrap.wrap drop whitespace before wrapping?
This might be an XY-problem regarding the question about textwrap.wrap. I don't need to use textwrap.wrap if there's an easier way.
I want to satisfy the following three criteria:
Printed output text ...
0
votes
1
answer
340
views
How to format nested method calls with outer functions on same line?
How do I get Eclipse to format my code like this:
f(g(
jkdfjkfjdsklfjsdkf,
fjdkfjdskfjsdklfjsdfkljsd,
rijekfjdskj,
));
instead of:
f(
g(
jkdfjkfjdsklfjsdkf,
...
0
votes
0
answers
507
views
Code style formatting without google-java-format plugin
Please tell me how to use code style formatting in IDEA?
I used the google-java-format plugin and it works very well for me.
An example of my code using the google-java-format plugin:
public Single<...
1
vote
0
answers
830
views
Intellij IDEA comma position when line wrap
I'm using IntelliJ IDEA Ultimate 2019.
Thanks to this question, I was able to put the binary operator on the next line when code reformatting breaks lines.
However, I do not find how to prevent the ...
0
votes
0
answers
76
views
My Visual Studio is showing random "formatting errors"
In the image below you can see my problem, I´m stuck with this problem for like 1 week now.
I cant work properly with these. ;(
Are there any solutions to this?
I tried deleting the .suo file and ...
3
votes
2
answers
873
views
How To Exclude Some Files From Checking Operations
I am using checkstyle plugin to format my code and I need to exclude some java classes from checking operations. To do that, I wrote the code below:
<module name="...
2
votes
2
answers
1k
views
Java coding style 2019 [closed]
I am curious to know the current coding style for java. My team is forcing to use {} for one liner if statements. Although we used to have braces for one liners current java source code does not use ...