Giter Site home page Giter Site logo

imx-smw's Introduction

Security Middleware Project

This git contains source code for the Security Middleware library.

All project information can be found at Security Middleware Confluence


Table Of Content

  1. Pre-commit hook
    1. Enabling pre-commit hooks
    2. Bypassing pre-commit hooks
  2. Formating Tools
    1. Installing clang-format
    2. Installing checkpatch
  3. List of changes

Pre-commit hook

Some pre-commit hooks are available to check:

  • The commit message format
  • The coding syle using clang-format
  • Run linux checkpatch
  • Check file copyright in commit

Enabling pre-commit hooks

This is under the developer responsability to enable the pre-commit hook on his local environment. The below script has to be executed one time in the source tee.

$ cd <your-source-tree>
$ ./scripts/enable-git-hooks.sh

The script create linked in the .git folder:

  • git-hooks/commit-msg: check the commit message.
  • git-hooks/pre-commit: run all scripts present in git-hooks/pre-commit.d/
  • git-hooks/pre-commit.d/check-copyright: verify that all source files copyright header. To remove files from the check, update the file .check-style.ignore in the root directory.
  • git-hooks/pre-commit.d/clang-format: run clang-format on all source files. Coding format is defined in the file .clang-format in the root directory.
  • git-hooks/pre-commit.d/checkpatch: run checkpatch on all files.

Bypassing pre-commit hooks

If for whatever reason you need to disable the hooks, simply add the --no-verify option to git commit command. It's no recommended to bypass hooks if commit is to be merge in mainline.


Formating Tools

Installing clang-format

The minimum version required is the version 9.0. To install the latest version in Ubuntu run the command:

sudo apt install clang-format

Installing checkpatch

There is no manual installation to be done. Script is uploading checkpatch in the top level .tmp directory created if not existing. The file .checkpatch.ignore excludes files/directory from the checkpatch verification.

Note: the scripts/checkpatch.sh can be executed as a normal script without using the pre-commit hook. More help with ./scripts/checkpatch.sh --help


List of changes

The list of changes can be found in the ChangeLog file.

imx-smw's People

Contributors

cneveux avatar desmetbruno avatar rkoman avatar thochstein 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.