How to ignore all whitespace issues when using dotnet format? - dotnet-cli

How to ignore all whitespace issues when using dotnet format?
I've generated an .editorconfig with mostly default options using these docs.
When I run this command...
dotnet format .\<SLN_NAME>.sln --verify-no-changes
...I see errors like: <ABSOLUTE_FILE_PATH>\file.cs(1,1): error WHITESPACE: Fix whitespace formatting. Replace <N> characters with '<A_BUNCH_OF_SPACES>'.
I looked through the .editorconfig settings to try to find the source of the issue, and I reviewed these docs but I don't see anything that looks helpful.
Is there a way I can silence these errors?

If you review this readme, you'll notice that you can use subcommands to target specific issues, one of which is whitespace.
This means you can run the commands below to target the non-whitespace subcommands, thus effectively ignore your whitespace issues:
dotnet format style .\<SLN_NAME>.sln --verify-no-changes
dotnet format analyzers .\<SLN_NAME>.sln --verify-no-changes

Related

Codename One: How to put a line break in a build hint?

I would like to extend my info.plist by
<key>NSLocationWhenInUseUsageDescription</key>
<string> first line
second line</string>
but I don't know how to apply this to the respective build hint (ios.plistInject). Note: the line break is relevant.
That particular build hint can be added using the ios.NSLocationWhenInUseUsageDescription (See the advanced topics section of the developer guide and do a find for "UsageDescription").
In general, if you copy and paste a build hint into Codename One Settings that includes line breaks, the line breaks will be retained.

emacs flycheck errors and display issues

I'm trying to get used to Emacs, I'm coding in C for my school. So, I installed flycheck to check for potential compliation errors. However, I encounter several problems. Here's the message I get when I test flycheck with the c/c++-gcc checker : flycheck buffer
I have two issues there : - first, flycheck claims the checker "returned a 1 exit code without errors" depsite the fact it actually did, and it's even displaying it right after ! - secondly, it does not seem to be able to display quotes correctly, the only thing displayed are their unicode escape sequences.
I can't find out why those issues are present. Can anybody help me on this ?
fixed both my problems by setting my environment language to UTF-8.

C: library for parsing configuration files and command line

I'm looking for some library with support for strict set of options (so non-existent options couldn't be set in config file) and possibility to also parse command line to override options from config file. Any ideas?
For command line, there is getopt or plentiful of code, some with more, some with less strange APIs, some in the form of open-codedness like getopt, others in table form with or without callback ability. As for config file, there is (lib)augeas if you need support for almost arbitrary formats.
Assuming you can use LGPL stuff in your project, there's http://www.hyperrealm.com/libconfig/, which appears, according to the docs, to have support in the API for setting values after a file has been parsed.

How to remove accents from string in C?

Is there is a more efficient way to remove accents from string without make an big array with the characters to replace?
For example:
removeaccents("áèfoo")
Output:
aefoo
In the ASCII table there no accents, I have no idea how to do this. Thanks in advance. :)
Sounds like you're looking for unac(). From the man page:
unac is a C library that removes accents from characters, regardless of the character set (ISO-8859-15, ISO-CELTIC, KOI8-RU...) as long as iconv(3) is able to convert it
into UTF-16 (Unicode).
I couldn't find the download page (I think it's meant to be here, but the link is currently 404ing). If you're on ubuntu, you can get it with:
sudo apt-get install libunac1-dev
Assuming you're using gcc, once it's installed you'll need to add -lunac to your compiler options (to tell the compiler to link with the unac library).

How to break words into syllables in LaTeX correctly

I am writing my MSc with LaTeX and I have the problem that sometimes my words are divided in a wrong way.
My language is spanish and I'm using babel package.
How could I solve it?
For example: propuestos appears prop-uestos (uestos in next line). It should be pro-puestos.
Thanks!!
If you only have a small number of hyphenation errors to correct, you can use \hyphenation to fix them. For instance: \hyphenation{pro-puestos}. This command goes after \documentclass and before \begin{document}.
You can put more than one dash in, if you want to give TeX more line-breaking options: \hyphenation{tele-mun-dos}. You can list many words inside the braces; put spaces between them.
If more than a handful of words are wrong, though, TeX is probably using hyphenation patterns for the wrong language -- and if "propuestos" were an English word, it would be hyphenated after "prop", so that's another point in favor of that theory. Do you get a message like this when you run LaTeX?
Package babel Warning: No hyphenation patterns were loaded for
(babel) the language `Spanish'
(babel) I will use the patterns loaded for \language=0 instead.
If so you need to reconfigure your TeX installation with Spanish hyphenation turned on. There should be instructions for that in the manuals that came with the installation. Unfortunately, this is one of the places where TeX's age shows through -- you can't just load a package with the proper hyphenation rules (or Babel would do that); you have to do it when compiling the "base format" with INITEX, which is a maintenance operation. Modern TeX installations have nice utilities for that but they're all different and I don't know which one you're using.

Resources