Coder Social home page Coder Social logo

codechecker's Introduction

Code Checker


Disclaimer from future me

07.05.2022

I wrote this Python script a long time ago! As I read through these lines of code, I see that they are structured and written pretty poorly, and that the script is a bit buggy and doesn't really work well for regularly formatted files :(
But it did serve its purpose for checking checkstyle errors at the time and was indeed pretty handy.
So, I've decided to keep this repo for old times' sake ๐Ÿ™ƒ


Code checker is a python script that you can run on code files and get data on your files.
It searches for some coding style problems (listed at the end of the file).
In addition to that, it prints data about your code.
Currently works only on C, C# and C++ files.

  • If you don't know how to run python files, read this Tutorial to run an .exe file.
  • If you know how to run python scripts, you are more than welcome to download the python script and run it.

Data printed in the end:

an example for a data summery looks like the following:

total number of lines: 545
number of comment lines: 251
number of code lines: 189
number of blank lines: 105
ratio of code/comments =  0.753
percentage of each from the total lines:
 - comments takes 46%
 - code takes 35%
 - blank lines takes 19%

Coding style checked:

  • 120 character limit in each row. (comments included)
  • Not more than 2 blank lines between code lines.
  • Indentation:
    Can use only one method of indentaion from the following:
    • tabs
    • spaces: 4 spaces each indentaion.
  • Comments:
    • cannot break one-line comment to more than one line.
      Use block comments instead!
    • block comments (or multi line comments) shouldn't have any text in line with the opening and closing brackets.
      โœ”๏ธ valid:
      /*
      comment_here
      */
      โŒ not valid:
      /* comment here
      */

Run example:

run example

Originally made for course "Introduction to Computer Science" 89-110, in Bar Ilan University.

codechecker's People

Contributors

tom-stack3 avatar

Watchers

 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.