yamlfixer
yamlfixer automates the fixing of problems reported by yamllint by parsing its output.
Usage
This software automatically fixes some errors and warnings reported by yamllint.
usage:
$ yamlfixer [--debug] [--verbose] [--backup] *.yml - thisfile.yaml
or:
$ yamlfixer [--help] [--version]
This will launch yamllint on each specified file name (-
is stdin), then parse its output and try to fix the reported problems.
If input is read from stdin, the corrected output will be sent to stdout. Other files will be overwritten if needed. Original files, stdin excepted, can be preserved as .orig if the --backup command line option is used.
Diagnostic information is sent to stderr in verbose or debug modes.
This command exits with 0
if all input files either are skipped or successfully pass yamllint strict mode, else -1
.
IMPORTANT: Not all problems are fixable by yamlfixer. Due to the way yamllint works, it doesn't currenlty report all faulty lines, yamlfixer might even introduce indentation problems under some circumstances. Use at your own risk, you have been warned...
Licensing information
Copyright (C) 2021 OPT-NC
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Contact
OPT-NC, aka Office des Postes et Télécommunications de Nouvelle-Calédonie, has a corporate website on www.opt.nc
You can contact the author of this software at [email protected]