Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

exasol/serial-version-uid-change-pre-commit-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SerialVersionUID Change Pre-commit Hook

This pre-commit hook requires the serialVersionUID to be changed if the containing file was changed. If a change is not required, simply add or remove an empty comment in the line of the serialVersionUID.

Setup

  1. install pre-commit on your machine
  2. Add the following lines to your .pre-commit-config.yaml (if not already present):
      - repo: https://github.com/exasol/serial-version-uid-change-pre-commit-hook
        rev: master
        hooks:
          - id: serial-version-uid
  3. Install the hooks using:
    pre-commit install
  4. Now git commit will fail if a check does not pass. You can also run the checks manual by executing pre-commit.

Limitations

This script does only check on a file system level. Accordingly, it may produce false positives in case a single file contains multiple classes (e.g a nested Exception class).

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages