From c6470a11440e2c3a3b8af8e9660ebf3dabf940d8 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Mon, 7 Aug 2023 12:27:29 +0200 Subject: [PATCH] v0.1: CHANGELOG, README, LICENSE, --help Document new feature in `--verbose` and mention contributor. --- CHANGELOG.md | 6 ++++++ FixWhitespace.hs | 7 +++++-- LICENSE | 4 ++-- README.md | 5 +++-- fix-whitespace.cabal | 6 +++--- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index febea23..0b0c2fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Version history. +# 0.1 Rainy Summer edition released 2023-08-07 + +- Flag `--verbose` now also displays locations of whitespace violations + ([#7](https://github.com/agda/fix-whitespace/issues/7), contributed by Artem Pelenitsyn). +- Tested with GHC 8.0.2 - 9.8.1-alpha1. + ## 0.0.11 Santa Clause edition released 2022-12-06 - Delete trailing tabs even when `--tab=0` diff --git a/FixWhitespace.hs b/FixWhitespace.hs index 2b51e8b..eebf449 100644 --- a/FixWhitespace.hs +++ b/FixWhitespace.hs @@ -66,12 +66,15 @@ options = [ Option ['h'] ["help"] (NoArg (\opts -> opts { optHelp = True })) "Show this help information." - , Option [] ["version"] + , Option ['V'] ["version"] (NoArg (\opts -> opts { optVersion = True })) "Show the program's version." , Option ['v'] ["verbose"] (NoArg (\opts -> opts { optVerbose = True })) - "Show files as they are being checked." + (unlines + [ "Show files as they are being checked." + , "Display location of detected whitespace violations." + ]) , Option ['t'] ["tab"] (ReqArg (\ts opts -> opts { optTabSize = ts }) "TABSIZE") (unlines diff --git a/LICENSE b/LICENSE index 02ce9e1..5955ede 100644 --- a/LICENSE +++ b/LICENSE @@ -1,9 +1,9 @@ -Copyright (c) 2005-2021 remains with the authors. +Copyright (c) 2005-2023 remains with the authors. fix-whitespace was originally written by Nils Anders Danielsson as part of Agda 2 with contributions from Ulf Norell, Andrés Sicard-Ramírez, Andreas Abel, Philipp Hausmann, Jesper Cockx, -Vlad Semenov, and Liang-Ting Chen. +Vlad Semenov, Liang-Ting Chen, and Artem Pelenitsyn. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/README.md b/README.md index de2b315..3751b34 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ fix-whitespace: Fixes whitespace issues This tool can keep your project and repository clean of trailing whitespace and missing terminal newline. -Usage: `fix-whitespace [-h|--help] [-v|--verbose] [--version] [--check] [--config CONFIG] [FILES]` +Usage: `fix-whitespace [-h|--help] [-v|--verbose] [-V|--version] [--check] [--config CONFIG] [FILES]` The program does the following to files specified in `FILES` or in the configuration file `fix-whitespace.yaml` under the current directory @@ -30,8 +30,9 @@ Available options: * `-v --verbose` Show files as they are being checked. + _Since 0.1:_ Display location of detected whitespace violations. -* `--version` +* `-V --version` Show program's version. diff --git a/fix-whitespace.cabal b/fix-whitespace.cabal index 5c0622b..1307b84 100644 --- a/fix-whitespace.cabal +++ b/fix-whitespace.cabal @@ -1,15 +1,15 @@ cabal-version: 2.2 name: fix-whitespace -version: 0.1.0 +version: 0.1 build-type: Simple category: Text synopsis: Fixes whitespace issues. description: Removes trailing whitespace, lines containing only whitespace, expands tabs, and ensures that every file ends in a newline character. -license: LicenseRef-OtherLicense +license: MIT license-file: LICENSE -author: fix-whitespace was originally written by Nils Anders Danielsson as part of Agda 2 with contributions from Ulf Norell, Andrés Sicard-Ramírez, Andreas Abel, Philipp Hausmann, Jesper Cockx, Vlad Semenov, and Liang-Ting Chen. +author: fix-whitespace was originally written by Nils Anders Danielsson as part of Agda 2 with contributions from Ulf Norell, Andrés Sicard-Ramírez, Andreas Abel, Philipp Hausmann, Jesper Cockx, Vlad Semenov, Liang-Ting Chen, and Artem Pelenitsyn. maintainer: Andreas Abel, Liang-Ting Chen homepage: https://github.com/agda/fix-whitespace bug-reports: https://github.com/agda/fix-whitespace/issues