code-formatting Questions

1

Solved

I have a project that contains some TypeScript files which I would like to format using the Prettier format while editing in IntelliJ IDEA, so that my resulting code matches that of my colleagues. ...
Cereus asked 17/5, 2022 at 21:36

1

Solved

I'd like to have my C# projects (.NET Core 3.1+) to be linted and formatted on each build both locally and in CI environment. I know that there's new .NET Analyzers feature and dotnet-format tool i...
Banderilla asked 1/5, 2022 at 17:14

5

Solved

I am trying to set up some tools to help maintain consistency in a codebase used by multiple developers. Is it necessary to use EditorConfig, ESLint and Prettier all together? As far as I und...
Maurreen asked 21/1, 2018 at 4:21

3

Solved

I'm working on a Rmarkdown document, and was told to strictly limit to a maximum number of columns (margin column) of 100. In the document's code chunks I used many different packages, among which ...
Rowlett asked 17/11, 2015 at 16:17

5

I just installed a beautify extension for vs code I want to have my code beautified whenever I save a file, but can't figure out how to configure it that way. It says Beautify on save will be ...
Gubernatorial asked 11/4, 2018 at 9:49

10

Xcode code formatter Swift I'm trying to auto format my code written in Swift. It's necessary if you're working in team and using CVS and don't want to merge for hours. Ctrl+I just makes an inden...
Noblewoman asked 18/11, 2014 at 12:7

4

Solved

I use Android Studio and when I commit to a repo on GitHub and view git diff I see a red marker at end of line for few files with a warning 'No newline at end of file'. How can I configure Android ...
Deflection asked 7/6, 2014 at 4:19

4

Solved

How to format file | project folder | all project files (using hot keys AND using menu) in Visual Studio Code?

1

Currently my eclipse formatter formats a multiline function call like this: someObject.doSomething( some().long().chain().of().methods() ); But what I want is for eclipse to align the closing ...
Rappee asked 21/9, 2015 at 11:48

1

Recently I started to use Black code formatter for my projects and sometimes it can be hard to track did I formatted all my changed files or not. Let's assume that my project contains 20 different ...

5

Solved

I cannot remember where, but recently I passed a comment where the user told that 1TBS is more preferred than Allman in JavaScript and said Allman has dangerous implications in JavaScript. Was it ...
Atp asked 28/6, 2012 at 14:54

4

Is there a way to format correctly HTML in VSCode when we use Twig or Swig tags, like {% if ... %} {%else%} {%endif%} {% for %} {%endfor%} {% include %}, etc... For now, code formatters remove all...
Deviation asked 29/11, 2016 at 12:45

13

Solved

How do you auto-indent your code in the Atom editor? In other editors you can usually select some code and auto-indent it. Is there a keyboard shortcut as well?
Heath asked 24/3, 2014 at 13:52

10

Solved

This has been asked before: Why doesn't Visual Studio code formatting work properly for Razor markup? But that question is a couple years old. And Razor formatting is still completely unaccepta...
Clemenciaclemency asked 20/11, 2013 at 14:30

6

Solved

I'd like to use sed to remove tabs from otherwise blank lines. For example a line containing only \t\n should change to \n. What's the syntax for this?
Burk asked 26/9, 2011 at 17:2

3

I have tried some proposals on here and here, but none of them works. How do you accomplish it for Java code or is there a way for general? En passant, I've install XML formatter in order that it m...
Calvary asked 21/3, 2017 at 23:27

11

Solved

Are there any utilities that reformat Delphi code ? EDIT I am using Delphi 2006 Some feedback Thanks to all that answered this question I have been using the JCF code formatter - it works we...
Rhinoplasty asked 31/12, 2008 at 11:2

6

Solved

How would you go about formatting a long line such as this? I'd like to get it to no more than 80 characters wide: logger.info("Skipping {0} because its thumbnail was already in our system a...
Reassure asked 13/1, 2010 at 17:41

6

Solved

We have a code style checker that's run before every check-in that requires that C# if statements be formatted like: if (condition) However, my muscle memory has already developed for typing: i...

16

Is it better to have all the private members, then all the protected ones, then all the public ones? Or the reverse? Or should there be multiple private, protected and public labels so that the ope...
Mick asked 21/11, 2008 at 12:13

5

Solved

I'm looking for a clang-format setting to prevent the tool from removing line breaks. For example, I have my ColumnLimit set to 120, and here's what happens when I reformat some sample code. Befo...
Multicolor asked 11/11, 2015 at 17:56

4

Solved

I believe keeping code consistent is kind of important stuff. Sometimes I mess my code with different handler names (working with Javascript). What is the right name for event handlers? onCli...
Flash asked 3/2, 2020 at 22:50

6

Solved

I'm extremely frustrated with the Eclipse formatting rules for a series of qualified invocations (i.e., the Builder pattern style). For example, here is my preferred formatting for some code that c...
Resign asked 20/1, 2010 at 21:16

5

Solved

Using VSCode 1.9.0 with the (donjayamanne) Python 0.5.8 extension, is it possible to provide Python specific editor options? Or more generally speaking, is it possible to provide language specific...
Harbour asked 8/2, 2017 at 16:33

7

Is there a keyboard shortcut or fast way to change the code below to a single line in Visual Studio 2013? I also have ReSharper installed. Multi new XElement("Option", new XAttribute(&qu...

© 2022 - 2024 — McMap. All rights reserved.