Commit Graph

121 Commits

Author SHA1 Message Date
Matthias Krüger f5c872ed52 htmlreport: stats: display total number of warnings/errors. 2014-07-30 01:27:50 +02:00
vBm ef0a4e87cb Some minor PEP8 fixes 2014-07-29 13:56:31 +02:00
Matthias Krüger da319b7485 htmlreport: stats: sort primary by occurrences but if several IDs occur equally often, sort them alphabetically. 2014-07-24 16:35:57 +02:00
Matthias Krüger f58873a9d6 htmlreport: on the index page, print stats of which warning ID occured how often. 2014-07-23 12:37:21 +02:00
Matthias Krüger ae0c1f7112 htmlreport: don't crash when pygments fails to determine filetype of a file we want to highlight. This happens for files with no extension (for example "foo" instead of "foo.c"). 2014-07-22 14:20:01 +02:00
Matthias Krüger 90b41aa672 htmlreport: if no arguments are passed, print --help output; when done generating the report, print where index.html is (take report_dir into account). 2014-07-22 14:11:19 +02:00
Matthias Krüger d718793540 htmlreport: sort error-data per line (in index.html page as well as in the defect list of the respective files.) 2014-07-21 21:48:16 +02:00
Matthias Krüger 46a0ab1754 htmlreport: fix #5998, crash on some files with "UnicodeDecodeError".
For those files that we can't decode, don't generate a html-preview but note into index.html that we couldn't process the file.
At the end, summarize on which files we failed and suggest using --source-encoding option.
2014-07-21 01:41:26 +02:00
Steven Myint ed73c3a026 Fix bad indentation 2014-07-18 11:09:12 -07:00
Matthias Krüger fadf9baf46 htmlreport: fix #5963, handle inconclusive messages and underlay them in grey color. 2014-07-17 23:05:00 +02:00
Toralf Förster 91fa452020 cppcheck-htmlreport: print the cppcheck version in every footer
missed in 2d4bae0

Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
2014-06-23 19:13:17 +02:00
Toralf Förster d3a71916aa htmlreport: Use source_encoding to open XML files 2014-06-18 22:13:26 +02:00
Matthias Krüger fdc717c6ea htmlreport: remove black background, make the report a bit more space efficient. 2014-06-05 23:00:54 +02:00
Matthias Krüger 275e2501ff htmlreport: fix syntax highlighting broken in ca4a0af840. 2014-06-05 22:10:32 +02:00
Matthias Krüger 6275ac0494 htmlreport: print filename in file page heading. 2014-06-01 14:17:15 +02:00
Matthias Krüger 2d92880d30 htmlreport: make content div overflow the menu properly when scrolling horizontally. 2014-06-01 11:28:02 +02:00
Matthias Krüger 5a8293d033 htmlreport: show index of errors of current page under Defect List link. 2014-06-01 09:37:17 +02:00
Matthias Krüger cb50c92d08 htmlreport: splitup HTML_HEAD where we want to insert the list of errors. 2014-06-01 09:37:17 +02:00
Matthias Krüger ca4a0af840 htmlreport: remove redundant <style> tags, make html output readable. 2014-06-01 09:37:17 +02:00
Matthias Krüger 9e90bed9bb htmlreport: make link to index page ("Defect list") fixed on the screen so we can always access it regardless of how low we scrolled. 2014-06-01 09:37:17 +02:00
Thomas Arnhold e63c61a1cf htmlreport: Generate file list sorted by file name 2014-05-25 18:58:51 +02:00
Toralf Förster 2d4bae0110 htmlreport: print the cppcheck version in the footer of the report 2014-05-25 14:36:52 +02:00
toralf 97894c298c Link to IRC channel instead of just mentioning it. 2014-05-24 20:47:27 +02:00
Daniel Marjamäki e70f0a601f Merge pull request #190 from myint/clean
Clean up cppcheck-htmlreport
2013-10-27 02:41:29 -07:00
orbitcowboy 924d4a8b05 htmlreport:README.txt: added command for installing pygments package for Linux systems. 2013-10-24 11:05:46 -07:00
Steven Myint 027fb83585 Clean up cppcheck-htmlreport
1. Use context managers rather than explicit "close()".
2. Use quotes consistently.
3. Clean up some pep8 complaints.
4. Avoid colliding names ("stream").
2013-10-24 05:17:09 -07:00
XhmikosR 7349d4b767 Update htmlreport/cppcheck-htmlreport.
There were cases where two subsequent lines have errors, that they overlapped.

Also, add box-sizing and use single quotes inside double quotes to get rid of escaping them.
2013-10-24 08:43:45 +03:00
XhmikosR 31a0e35ef2 Tweak cppcheck-htmlreport.
Move style to a class and tweak properties.
2013-10-23 19:21:20 +03:00
XhmikosR 11a0763b40 Merge pull request #186 from matthiaskrgr/css2
html-report CSS
2013-10-23 09:06:42 -07:00
Steven Myint 0758088811 Use Unicode consistently throughout the script
This is related to #186.
2013-10-23 06:34:50 -07:00
Matthias Krüger ab3f866911 htmlreport: allow content to be wider and reduce height of menu box. If we need STILL more width for the content box, the scroll bar is added as fallback anyway. 2013-10-22 20:30:46 +02:00
Matthias Krüger df88acb04d htmlreport: fix page border, seperation border at right side of linenumbers. 2013-10-22 20:30:46 +02:00
Matthias Krüger ca2e5e3fff htmlreport: change grey-tone of the code-line numbers, set page-width to auto and adjust margin. 2013-10-22 20:30:46 +02:00
Matthias Krüger 7fa5435d54 htmlreport: use "overflow: auto" in body. This prevents the <pre> text from overlapping the "page" class. Instead a scrollbar is displayed at the bottom of the element. 2013-10-22 20:30:46 +02:00
Matthias Krüger 4f1fdce09e htmlreport: give warnig boxes ("HTML_ERROR") smaller frame and padding so they don't overlap each other if there is another one in next line.
borderwith: 2px -> 1px
padding:    3px -> 1px
2013-10-22 20:30:46 +02:00
Daniel Marjamäki b6c405ef21 Merge pull request #182 from matthiaskrgr/travis
Travis check --errorlist output via htmlreport, check xml output via xmllint
2013-10-13 11:33:42 -07:00
XhmikosR a42177c2e5 Update cppcheck-htmlreport.
* remove unneeded classes
* remove non-existent background images
* tweak properties
* use the proper capitalization for "Cppcheck" and "HTML"
2013-10-13 11:03:42 +03:00
Matthias Krüger 8397d99370 travis: move htmlreport checks into /htmlreport/checks.sh and make travis run it. 2013-10-12 15:49:42 +02:00
XhmikosR 1b7b3102ef cppcheck-htmlreport: PEP8 fixes. 2013-10-12 12:04:25 +03:00
Steven Myint 18402bf673 Fix Travis tests
This fixes a bug introduced in #180.
2013-10-11 23:43:07 -07:00
Daniel Marjamäki 9271286425 Merge pull request #175 from matthiaskrgr/htmlreport
mention --help in cppcheck-htmlreport readme & implement 2 tests for it into travis
2013-10-07 10:32:48 -07:00
Steven Myint 9475a7d029 Allow running "test_htmlreport.py" from any path
This fixes a Travis CI failure.
2013-10-07 07:36:34 -07:00
Matthias Krüger f324a1a736 htmlreport: mention the --help option in the readme. 2013-10-07 16:03:26 +02:00
Steven Myint e183a826c5 Fix typo in getting line number
The closing parenthesis was in the wrong place resulting in the default
value not getting set. This adds a test case.
2013-10-07 06:38:49 -07:00
Steven Myint 6ad30a1c69 Handle "--xml-version=2"
This also adds "test_htmlreport.py" to the Travis CI tests.
2013-10-06 13:34:48 -07:00
PKEuS 53adafb1f2 Fixed htmlreport (#5068) 2013-10-05 12:20:25 +02:00
XhmikosR ae73466f97 Python scripts: PEP8 fixes 2013-03-03 09:59:16 +01:00
XhmikosR fd10110404 htmlreport/cppcheck-htmlreport: simplify css 2012-12-23 18:20:04 +01:00
XhmikosR 01716264c2 merge htmlreport/.gitignore in .gitignore 2012-10-12 17:46:57 +02:00
XhmikosR 9b5c245899 tabs to spaces, remove trailing spaces and extra empty lines at the end of files 2012-09-29 13:49:16 +02:00
myint 91199bbd6d Highlight errors to make them obvious 2012-09-15 13:41:56 -07:00
myint 85b0a4d398 Generalize HTML check a bit 2012-09-09 14:05:38 -07:00
myint 6738a760b1 Make test names more descriptive 2012-09-09 12:29:59 -07:00
myint 2bbdac3816 Ignore generated files 2012-09-09 10:01:39 -07:00
myint df5fa209d4 Add pygments dependency 2012-09-09 09:59:57 -07:00
myint 97119b8de0 Add tox configuration file
tox makes it easy to test against multiple Python interpreters. See
http://tox.testrun.org for details.
2012-09-09 09:58:38 -07:00
myint 3cb737131b Add tests for cppcheck-htmlreport 2012-09-09 09:58:21 -07:00
myint 37ac74d946 Make shebang more cross-platform 2012-09-09 08:48:13 -07:00
myint 8cd0b44ef0 Add Python 3 compatibility
Maintain backward compatibility with Python 2.6 and 2.7.
2012-09-07 09:44:46 -07:00
Daniel Marjamäki c1c4ffd700 Fixed #3057 (cppcheck-htmlreport fails since 1.50) 2011-08-30 20:30:52 +02:00
Stefan Weil cc41da1dc4 html report: better handling of non ASCII characters in C source code 2011-04-16 11:22:44 +02:00
vBm 46a11183a5 Fixed some spelling mistakes 2010-12-15 18:45:53 +01:00
Henrik Nilsson 628f4ad6e7 cppcheck-htmlreport now takes a parameter for source code encoding to support non ascii characters.
Also present a nicer error message if highlighting fail for a file.
2010-01-14 09:47:38 +01:00
Henrik Nilsson f6c24f9070 cppcheck-htmlreport now takes a --title parameter that will be displayed on top of every page. 2010-01-13 14:11:54 +01:00
Henrik Nilsson c4775b7ee4 Added !DOCTYPE declaration for html generated by the cppcheck-htmlreport tool. 2010-01-13 14:01:45 +01:00
Henrik Nilsson 5240e1a8bf cppcheck-htmlreport now annotates the highlighted source code with the cppcheck error message. 2010-01-12 21:35:54 +01:00
Henrik Nilsson e85cfd8041 Fixed some markup errors in generated html from the cppcheck-htmlreport script. 2010-01-12 20:34:55 +01:00
Henrik Nilsson c83f446412 cppcheck doesn't always report a filename for an error.
Added some error checking so this tool doesn't crash.
2009-12-15 13:28:26 +01:00
Henrik Nilsson f1ad308f5f Added a installation script for the cppcheck-htmlreport utility.
The script uses distutils to install the script into /usr/bin/.
The following will install the script:
   sudo ./setup.py install
2009-12-15 09:03:15 +01:00
Henrik Nilsson 89b2118622 index.html page is now complete with a list of files and all errors found.
Other changes:
* added a stylesheet and made the html design much better.
* contains links directly to the line in the source file.
2009-12-11 12:39:39 +01:00
Henrik Nilsson b107617d46 Added a python script that takes the cppcheck output xml file
and generates a html report of it. The html report is complete
with syntax highlighted source code using the pygments module.

This initial commit contains generation of html files but the
actual errors is missing from the html content and the index.html file.
2009-12-08 15:09:21 -05:00