GithubHelp home page GithubHelp logo

staudenmaier / clang-visualizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from austinbhale/clang-tidy-html

0.0 1.0 0.0 114 KB

Visualizer for clang-tidy log output

License: MIT License

Python 100.00%

clang-visualizer's Introduction

Clang-Visualizer

A visualizer for LLVM's linting tool: clang-tidy.

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

Install Clang-Tidy to use for your C/C++ source files.

On your local Linux machine, installation is as easy as:

sudo apt install clang-tidy

You will need bash or some other terminal to execute the script. Download Python 3 or higher here.

When running clang-tidy on your files, be sure to pipe it into a new log file of checks:

clang-tidy -checks=* [filename.c] | tee [newfile.log]

If you are receiving the following error:

Error while trying to load a compilation database: Could not auto-detect compilation database for file "your_file.c" No compilation database found in /your/directory or any parent directory

Create a simple json file to be compiled into your project documented here.

Running the script

Clone or fork this repository to run the script on your native system.

The script takes in one file argument of a txt or log file with your outputted clang-tidy checks.

python3 clang_visualizer.py [newfile.log]

Inside the same directory as clang_visualizer.py, you will find a new html file called 'clang.html'.

An example html output can be found here.

A separate example with the external link option as a button can be found here.

The highlighting functionality uses your local session storage, which will save your changes on exit.

Contributing

Feel free to create a pull request for any updates or fixes to this repository.

Versioning

This repository uses LLVM Clang for versioning. All checks confirmed for version 6.0-8.0. Earlier versions should have support for the vast majority of checks.

Authors

  • Austin Hale

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

clang-visualizer's People

Contributors

austinbhale avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.