Make Clang-Format give detailed error when there is a format problem - clang-format

As the title suggests I'm running Clang-Format on my code in order for it to show me if there are any format error...
The thing I wanna know is if there is a way to make the output more detailed, because every time it fails it does it with the same error:
error: code should be clang-formatted [-Wclang-format-violation]
like, is there any way for it to show me the specific violation?
I'm running clang like this:
clang-format -style=file --dry-run --Werror
Thank you all in advance :)

Related

Error trying to parse file: Unexpected character, expected a comma or closing bracket in Packages\User\Default\(Windows).sublime-keymap:2:28

Ok guys, this is what I get when I try to run Sublime Text 3. Mind you, the program still works but the alert d-box is annoying. How can I get rid of it? Thanks!
do you get that problem when you launch SublimeText?..it seems a error when trying to parse a SublimeText file or maybe some of your files. I understood that you have to separate your word by commas..but i dont know exactly..
Probably you saved (accidently) some of these config files and messed up the syntax. check for modification date of the files you touched. Probably is the file Packages\User\Default\(Windows).sublime-keymap, line 2, column 28.
If you can't work out the hick-up, edit your post and include the line(s) of that file-

Write Check Marks in RMarkdown?

I try some examples from LaTeX, such as \Checkedbox, \CrossedBox*, \HollowBox, but unfortunately, they all do not work. I found $\Box$, $\checkmark$. Anyone know how to type checked box?
You can create your own command which overlays \checkmark on top of \Box:
\newcommand{\boxedcheckmark}
{{\ooalign{$\Box$\cr\hidewidth$\checkmark$\hidewidth}}}
I found $\Box$, $\checkmark$. Anyone know how to type checked box?
Check $\boxedcheckmark$ to see if it suits your needs.

Closure compiler does not write out errors

I have a Groovy script that runs the closure compiler latest version.
def command = "java -jar $compiler --js $orderedDependencies --js_output_file $minFilename --create_source_map $mapFilename --compilation_level WHITESPACE_ONLY --source_map_format=V3 --language_in=ECMASCRIPT5 --debug --formatting=PRETTY_PRINT"
command.execute(null as List, outputDir).waitForProcessOutput(System.out, System.err)
When I use it without the --language_in option, I get error output. When I add the command option, I don't get any error output, but it breaks somewhere, because nothing gets created and the web interface is broken.
Does anyone have any idea why this might be?
I'm not sure what the problem is since the code you provided isn't enough the reproduce it.
But chances are that you are searching in the wrong place: the .execute() command can be quite annoying. Take a look at this question to get some ideas on what could go wrong and how to solve it: Trying to send an email trough a groovy shell script

How do I find the location of a Doxygen latex error?

My question is similar to this one.
Doxygen is outputing a warning while trying to generate docs for HTML:
warning: reached end of file while inside a f$ block!
The command that should end the block seems to be missing!
I understand what this means, but I have lots of LaTeX in this particular document. Unfortunately, the line number of the error is just the last line in the file, and Doxygen doesn't output the the \f$ that opened the math mode.
Is there a way to get Doxygen to output this, rather than me having to scour the file for a missing or malformed \f$? Something that might produce more verbose errors?
Before I finished typing this question, I found the offending line by browsing the generated HTML and looking for a function in that file that didn't get documented. That at least gave me enough of a hint for where to start looking. Still it would be great if there was a more concrete answer to this.
When generating for Latex with Doxygen, it is indeed not obvious to spot errors. One solution is to get down into the latex generated folder, and try these steps:
Run generated makefile ($ make), and look for pdflatex compiler output,
If it fails, load the file refman.tex into some Latex IDE (say, Texstudio or equivalent) and try to compile from there.
If still unable to locate error, you can run manually pdflatex with option halt-on-error:
($ pdflatex -halt-on-error refman.tex). This way, it will stop immediately at the error location.

ghostscript command line arguments output file name change

I am using ghostscript to print a pdf by command line arguments in c#. but it shows the printed document's name as ghostScript output. I want to change it to a custom name(as letter's name). I know in command line parameters, it does not allow to change it. please help.
I'm sorry, I really don't understand what you're asking. You specify where Ghostscript should write it's output using the "-o" or "-sOutputfile=" command line parameters. The name of the input file does not influence the output file.
Unless you are using something like ps2pdf.....
If you can clarify what you are trying to do, I or someone else can likely help.
Chris

Resources