Forum > General

Compile Messages and JCF Messages



I recently noticed,that the code formatter JCF brings up some useful hints
like case sections without else, complains about *.destroy and others in the message window.

 - JCF doesn't start the messages window, so you have to be aware, that there may be such hints.
 - JCF only works on one single unit. 
 - These messages would als be usefull after a compiler run.

Is it possible to do the same checks with each compiler run or to let JCF run over the whole project?
I did not find any options in the project settings.

Thanks in advance


I run JCF from the command line and let it operate on entire directories.

Not sure it this would help you.

Using lazbuild, build the components/jcf2/CommandLine/Lazarus/JCF.lpr package
(may need to symlink jcf.lpi in there to JCF.lpi, the paths are cased incorrectly).
resulting binary is in components/jcf2/Output/Lazarus/JCF

But yeah, it does have lots of hints, which are useful.

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---$ JCF -config=jcfsettings.cfg  -?No path found JEDI Code Format V2.44 August 2009 A Delphi Object-Pascal Source code formatter A GUI version of this program is also available Latest version at Syntax: jcf [options] path/filename  Parameters to the command-line program:   Mode of operation:  -obfuscate Obfuscate mode or  -clarify Clarify mode   When neither is specified, registry setting will be used.   This normally means clarify.  Mode of source:  -F Format a file. The file name must be specified. -D Format a directory. The directory name must be specified. -R Format a directory tree. The root directory name must be specified.  When no file mode is specified, registry setting will be used.  Mode of output:  -inplace change the source file without backup -out output to a new file -backup change the file and leave the original file as a backup  If no output mode is specified, registry setting will be used.  Other options:  -config=filename  To specify a named configuration file -y Overwrite files without confirmation. -? Display this help 

Previously I ran lazarus and went into the Jedi Code Formatter setup to configure JCF.
This produces ~/.lazarus/jcfsettings.cfg which I copy to where I use it.
JCF -config=jcfsettings.cfg -inplace -R .


[0] Message Index

Go to full version