Coder Social home page Coder Social logo

trjw / nett Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dgrobb/nett

0.0 0.0 0.0 283 KB

A C code style checker which checks for compliance with the style guide for CSSE2310 at the University of Queensland

License: GNU General Public License v3.0

CMake 0.63% C++ 72.97% Python 17.38% C 8.24% Dockerfile 0.18% Shell 0.60%

nett's Introduction

nett

nett is command-line utility used to perform style checking on C source files. It checks for compliance with the style guide used by the CSSE2310 programming course at the University of Queensland.

Usage

The program has the following modes of operation:

  1. Perform style checking on a set of source files and output all found violations to the terminal (default)

    nett file1 [file2 ...]
    
  2. Perform style checking on a set of source files and generate .styled files containing a capped number of violations found.

    nett --generate-files file1 [file2 ...]
    

    The generated .styled files will be created in the same directory as the original source files provided.

Installation

nett is written using the Clang Libtooling framework. In order to build the program, its source code is required to be stored within a checked-out LLVM git repository under llvm-project/clang-tools-extra.

To do this, run the following:

git clone https://github.com/llvm/llvm-project.git && \
  cd llvm-project && \
  git checkout 82fbc5d45b0c2fc9050d1d5e335e35afb4ab2611 && \
  cd clang-tools-extra && \
  git submodule add https://github.com/dgrobb/nett.git && \
  cd nett

Once the nett source files are in place (under llvm-project/clang-tools-extra), it can be built using the provided build script

./build.sh

Note that the build process requires cmake and ninja to be installed beforehand.

Tests

To check that the program works correctly, you can run the test suite using the provided test script

./runtests.sh

Docker Compatibility

nett is also available via Docker Hub. To build the docker image from scratch, run

docker build -t nett .

To run the program via the publicly available docker image (dgrobb/nett), you can use the provided wrapper script:

./nettrun.py [--generate-files] file [file ...]

This script wraps the docker run command and takes care of mounting the necessary directories for the program to work correctly.

License

nett is licensed under the GNU General Public License v3.0.

nett's People

Contributors

dgrobb avatar trjw avatar prsutton 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.