Skip to content

Latest commit

 

History

History
55 lines (45 loc) · 1.09 KB

README.md

File metadata and controls

55 lines (45 loc) · 1.09 KB

Overview

Provides support for linting git commit messages against Conventional Commits rules.

Configuration

See tags to determine the latest available version. Then configure the plugin in your project as follows:

build.gradle

plugins {
  id "com.star-zero.gradle.githook" version "1.2.0"
  id "ru.netris.commitlint" version "1.4"
}

githook {
  failOnMissingHooksDir = false
  createHooksDirIfNotExist = false
  hooks {
    "commit-msg" {
      task = "commitlint -Dmsgfile=\$1"
    }
  }
}

commitlint {
  enforceRefs = false
}

settings.gradle

pluginManagement {
  repositories {
	gradlePluginPortal()
  }
  resolutionStrategy {
	eachPlugin {
      if (requested.id.id == "ru.netris.commitlint") {
        useModule("ru.netris:commitlint-plugin:${requested.version}")
      }
	}
  }
}

See also