I am using the Uncrustify plugin for Xcode5 (BBUncrustifyPlugin) to format my code nicely. However when formatting the active file it gives the errors:
Uncrustify Formatter error:
Parsing: XDImageViewController.m as language OC
XDImageViewController.m:33 Unmatched NEWLINE
Looking at this line all I have is a single hash # followed by a new line. like so:
#
#pragma mark - Section header
#
Can anyone tell me if there is a way to get Uncrustify to ignore this error or work around it? I don't see why a hash should cause problems.
Thanks.
Related
Intellij keeps formatting my spotbugs.yml file incorrectly, and so breaking the github action.
I cannot figure out why it's doing this:
It was working fine last week, I haven't made any changes to the formatting config, but now, every time I change focus from the file Intellij auto-formats like this, then saves it. How can I fix it?
The thing I don't get is what it's formatting to appears to be invalid yaml, right?
YAML has a syntax that makes it incompatible with indentation that is not 2 spaces. With 4 spaces, you have:
droggel:
jug:
- sequence item: with indentation
this line: isn't aligned to four spaces
nor are further indented lines:
if you indent relative four spaces
spam:
- same: problem
without: indenting the sequence item
This makes it hard for code formatters to get it right. Proper alignment would mean:
droggel:
jug:
- three spaces after the sequence item indicator.
that's horrible, nobody does that.
spam:
- alternatively this.
nobody does this either and it breaks
- - with nested sequences
I assume some bug in IntelliJ causes the formatter to be confused because of this. Generally it would be better to just use 2 space indentation which seems far more natural due to the problems described above. That should avoid confusing the formatter.
In a pre-build event, a batch file is executed to combine multiple SQL files into a single one.
It is done using this command :
COPY %#ProjectDir%\Migrations\*.sql %#ProjectDir%ContinuousDeployment\AllFilesMergedTogether.sql
Everything appear to work fine but somehow the result give an incorrect syntaxe error.
After two hours of investigation, it turn out the issue is caused by an invisible character that remain invisible even with notepad++.
Using an online website, the character has been spotted and is U+FEFF has shown in following image.
Here are the two input scripts.
PRINT 'Script1'
PRINT 'Script2'
Here is the output given by the copy command.
PRINT 'Script1'
PRINT 'Script2'
Additional info :
Batch file is encoded with UTF-8
Input files are encoded with UTF-8-BOM
Output file is encoded with UTF-8-BOM.
I'm not sure it is possible to change the encoding output of command copy.
I've tried and failed.
What should be done to eradicate this extremely frustrating parasitic character?
It has turned out that changing encoding of input files to ANSI does fix the issue.
No more pesky character(s).
Also, doing so does change the encoding of the result file to UTF-8 instead of UTF-8-BOM which is great I believe.
Encoding can be changed using Notepad++ as show in following picture.
I am using emmet with Coda 2, version 2.6.6. When I use it to create multiple lines, Coda is showing some sort of end of line character.
For instance, if I use section.container>div*4>{$}, I get the following:
At the end of the first three divs is a some sort of EOL character, and I don't know how to get rid of it. I looked through the editor preferences and did not see anything that would allow me to hide that character. I've tried it on two different macs and have the exact same results.
Is there a way to get rid of it.
I've noticed this recently in 2.5.16. it may be related to having mixed line endings.
If you go to Text > Line Endings > Convert to (whatever type of line endings you use), it should clear the symbol.
I want uncrustify to ignore new lines which is formatted by developer but with my config file it does not do this.
What my code looks like and i want it unchanged
+ (void)doSometingAwesomeWithIndex:(NSInteger)index
howManyDaysLater:(BOOL)howManyDaysLater
myBroes:(NSMutableArray *)broes
completion:(AwesomeBlock)completionBlock
What uncrustify does when it formats
+ (void)doSometingAwesomeWithIndex:(NSInteger)index
howManyDaysLater:(BOOL)howManyDaysLater
myBroes:(NSMutableArray *)broes
completion:(AwesomeBlock)completionBlock
I am using uncrustify 0.61 and my config file is http://www.megafileupload.com/edbM/uncrustify.cfg
I suggest https://github.com/square/spacecommander.
Possible duplicate of Can Uncrustify align colons in Objective-C method calls?
I am trying to convert a markdown document to pdf using pandoc, and it was working fine until it just started to show an error:
pandoc: Could not parse YAML header: did not find expected alphabetic or numeric character "source" (line 32, column 85
pandoc: YAML header is not an object "source" (line 17, column 1)
pandoc: Could not parse YAML header: did not find expected alphabetic or numeric character "source" (line 8, column 91)
Lines 32 and 8 are blank lines between paragraphs, and all that's on line 17 is "---".
I don't even know what YAML is, but I don't want to use it, just MD->LaTeX->PDF.
Searched for these errors but could only find stuff mentioning YAML, not the errors.
Any help would be appreciated.
See http://johnmacfarlane.net/pandoc/README.html#yaml-metadata-block
There must be something in your document that looks like a YAML metadata block, but isn't.
Such a block would start with --- on a line by itself and end with --- or ... on a line by itself. The line numbers in the error message refer to lines inside the metadata block, not to lines of the document.
By the way, you can turn off YAML metadata block parsing entirely by putting
--from markdown-yaml_metadata_block
in your pandoc command line.