Fix yaml lint errors

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2019-03-04 09:58:37 +05:30
parent 8f07c9efcc
commit 57cea727fa
2 changed files with 24 additions and 13 deletions

View File

@ -49,6 +49,6 @@ jobs:
deploy: deploy:
- provider: script - provider: script
on: # yamllint disable-line rule:truthy on: # yamllint disable-line rule:truthy
all_branches: true all_branches: true
script: ./deploy.sh script: ./deploy.sh

View File

@ -33,7 +33,8 @@ run:
# output configuration options # output configuration options
output: output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" # colored-line-number|line-number|json|tab|checkstyle|code-climate,
# default is "colored-line-number"
format: colored-line-number format: colored-line-number
# print lines of code with issue, default is true # print lines of code with issue, default is true
@ -45,17 +46,19 @@ output:
# all available settings of specific linters # all available settings of specific linters
linters-settings: linters-settings:
errcheck: errcheck:
# report about not checking of errors in type assetions: `a := b.(MyStruct)`; # report about not checking of errors in type assetions:
# `a := b.(MyStruct)`;
# default is false: such cases aren't reported by default. # default is false: such cases aren't reported by default.
check-type-assertions: true check-type-assertions: true
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; # report about assignment of errors to blank identifier:
# `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default. # default is false: such cases aren't reported by default.
check-blank: true check-blank: true
# path to a file containing a list of functions to exclude from checking # path to a file containing a list of functions to exclude from checking
# see https://github.com/kisielk/errcheck#excluding-functions for details # see https://github.com/kisielk/errcheck#excluding-functions for details
#exclude: /path/to/file.txt # exclude: /path/to/file.txt
govet: govet:
# report about shadowed variables # report about shadowed variables
check-shadowing: true check-shadowing: true
@ -91,7 +94,8 @@ linters-settings:
misspell: misspell:
# Correct spellings using locale preferences for US or UK. # Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English. # Default is to use a neutral variety of English.
# Setting locale to US will correct the British spelling of 'colour' to 'color'. # Setting locale to US will correct the British spelling of 'colour' to
# 'color'.
locale: US locale: US
ignore-words: ignore-words:
- someword - someword
@ -104,19 +108,26 @@ linters-settings:
# tab width in spaces. Default to 1. # tab width in spaces. Default to 1.
tab-width: 1 tab-width: 1
unused: unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false. # treat code as a program (not a library) and report unused exported
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors: # identifiers; default is false.
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations # XXX: if you enable this setting, unused will report a lot of
# false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages.
# All text editor integrations
# with golangci-lint call it on a directory with the changed file. # with golangci-lint call it on a directory with the changed file.
check-exported: false check-exported: false
unparam: unparam:
# Inspect exported functions, default is false. Set to true if no external program/library imports your code. # Inspect exported functions, default is false. Set to true if no external
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: # program/library imports your code.
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations # XXX: if you enable this setting, unparam will report a lot of
# false-positives in text editors:
# if it's called for subdir of a project it can't find external
# interfaces. All text editor integrations
# with golangci-lint call it on a directory with the changed file. # with golangci-lint call it on a directory with the changed file.
check-exported: false check-exported: false
nakedret: nakedret:
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30 # make an issue if func has more lines of code than this setting and
# it has naked returns; default is 30
max-func-lines: 30 max-func-lines: 30
linters: linters: