• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. Skara
  4. git-jcheck

Page History

Versions Compared

Old Version 1

changes.mady.by.user Erik Helin

Saved on Jul 10, 2020

compared with

New Version 2

changes.mady.by.user Erik Helin

Saved on Jul 10, 2020

  • Next Change: Difference between versions 2 and 3
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The above configuration shows that for OpenJDK project Skara git-jcheck will verify that commits have an author with full name and e-mail, is reviewed by at least one Reviewer from project Skara and that files with the suffixes .java, .yml, .gradle and .txt do not contain tabs, carriage returns or trailing whitespace.

Since the .jcheck/conf file is versioned every commit is checked according to the conventions described in the .jcheck/conf file in that commit. This means checks can be added and/or removed and old commits will still be checked correctly. If no .jcheck/file is present in a commit then git-jcheck exits with status code 0.

Usage

Code Block
$ git jcheck -h
usage: git jcheck [options] 
        -r, --rev REV                      Check the specified revision or range (default: HEAD)
            --whitelist FILE               Use the specified whitelist (default: .jcheck/whitelist.json)
            --blacklist FILE               Use the specified blacklist (default: .jcheck/blacklist.json)
            --census FILE                  Use the specified census (default: https://openjdk.java.net/census.xml)
            --ignore CHECKS                Ignore errors from checks with the given name
            --setup-pre-push-hook          Set up a pre-push hook that runs jcheck on commits to be pushed
        -m, --mercurial                    Deprecated: force use of mercurial
        -v, --verbose                      Turn on verbose output
            --debug                        Turn on debugging output
            --lax                          Check comments, tags and whitespace laxly
        -s, --strict                       Check everything
        -v, --version                      Print the version of this tool
        -h, --help                         Show this help text

...

Note: if git-jcheck discovers any errors then the push will be aborted.

Configuration

All options to git-jcheck can be configured via Git's configuration files. For example, the following will always use a local version of census stored in ~/.jcheck/census.xml when running git-jcheck:

Code Block
languagebash
$ git config --global jcheck.census "$HOME/.jcheck/census.xml"
Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 297, "requestCorrelationId": "522a90a43d0d09f0"}