From 47aadbe8d25a5033723a204e348c022c1c75e8e0 Mon Sep 17 00:00:00 2001 From: Yahor Berdnikau Date: Wed, 9 Oct 2019 21:08:02 +0200 Subject: [PATCH] Mention Ktlint uses .gitignore pattern style syntax. (#609) Signed-off-by: Yahor Berdnikau --- README.md | 3 ++- ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 000f5c8546..dbaeeeadcd 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,8 @@ Usually simple `http_proxy=http://proxy-server:port https_proxy=http://proxy-ser $ ktlint --color src/main/kotlin/Main.kt:10:10: Unused import -# check only certain locations (prepend ! to negate the pattern) +# check only certain locations (prepend ! to negate the pattern, +# Ktlint uses .gitignore pattern style syntax) $ ktlint "src/**/*.kt" "!src/**/*Test.kt" # auto-correct style violations diff --git a/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt b/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt index 4a42b274f3..2711707ccb 100644 --- a/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt +++ b/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt @@ -91,7 +91,8 @@ Examples: # (hidden folders will be skipped) ktlint - # check only certain locations (prepend ! to negate the pattern) + # check only certain locations (prepend ! to negate the pattern, + # Ktlint uses .gitignore pattern style syntax) ktlint "src/**/*.kt" "!src/**/*Test.kt" # auto-correct style violations