11 Commits

Author SHA1 Message Date
Vladislav Kuzmin
43fad9ad85 Replace Non-ASCII symbols
Update golanci version, because we need to add asciicheck linter.
Because of update appears some gosec issues.

Closes: #312

Change-Id: I54759e7301f0fb9dcb60eb7d9a2d1e9cebfaf359
2020-08-05 13:22:59 +00:00
Ian Howell
0045374b75 Remove deprecated scopelint linter
The scopelint linter has been made obsolete [0]

[0] https://github.com/kyoh86/scopelint#obsoleted

Change-Id: I036dd5842e44e6865f3dc11bfcb430c08841d5c2
2020-06-02 15:52:40 -05:00
Yasin, Siraj (SY495P)
fffc42ad8a Enable golint as part of golangci-lint.
Issues raised after enabling golint as part of golangci-lint

  * error var ToDiscoveryError should have name of the
	form ErrFoo (golint)
  * error strings should not be capitalized or end with punctuation
	or a newline (golint)

Issues not raised by golint embedded within golangci-lint

  * comment on exported function <funcname> should be
      of the form "<funcname> ..."

So kept the golint standalone tool also in Makefile

Change-Id: I7f2ce66d1e757bc24c042fc212226cecea297f27
2020-05-20 13:29:11 -05:00
Ian Howell
58767afa61 Remove deprecated interfacer linter
The `interfacer` linter has self-deprecated due to the following [0]:

    A tool that suggests interfaces is prone to bad suggestions, so its
    usefulness in real code is limited

This commit removes the deprecated linter.

[0]: https://github.com/mvdan/interfacer#interfacer

Change-Id: I076c8afb6495292769c041bf15b5294965a0bce9
2020-04-30 09:33:31 -05:00
Yasin, Siraj (SY495P)
c25d223c7b Add copyright for missing files
* added license templates for go, bash & yaml in tools dir
* added a script that will add license information for all
    missing files. Type:  go, yaml, yml, sh
* skip adding license for all files within testdata
* Syntax:
   > ./tools/add_license.sh

* Skip license for manifests folder
* Added one extra line after licene for yaml files
* Added License after Hashbang for bash.
* Add an extra line after hashbang and before license
* Updated the go template to use multiline comments

New Files:
  1. tools/add_license.sh
  2. tools/license_go.txt
  3. tools/license_yaml.txt
  4. tools/license_bash.txt

Change-Id: Ia4da5b261e7cd518d446896b72c810421877472a
Realtes-To:#147
2020-04-09 08:35:59 -05:00
Ian Howell
855fecc45e [#53] Disable the dupl linter
dupl produces too many false positives to continue to be useful. This
change disables it.

Change-Id: I696160890b0a69aacb28977dfee268f14d3c6c20
2020-02-19 14:04:22 -06:00
Ian H Pittwood
6cb70e7eb3 [#17] Fixes to airshipctl docs
Various typo fixes in documents

Various grammar and language changes for clarification

Change-Id: I111bf45c90405a26d09a5254733a055c78b47407
2020-02-10 19:25:07 +00:00
Ian Howell
49027f4151 Tighten the restrictions of the linter
This change causes the linter to be a bit more complainy. The hope is
that this will cut down on some of the more pedantic issues being caught
in code reviews, and thus reduce the overall time a change spends in the
review process.

This change includes various changes to the codebase to bring it up to
the new standards.

Change-Id: I570d304bca5554404354f972d8a2743279a0171b
2020-01-10 14:54:34 -06:00
Ian Howell
4f91de6e24 Fix deprecated field in linter config
The `deadline` field was deprecated in v1.21.0 of the linter in favor of
`timeout`

Change-Id: I543930d522311fa3e41c14d55624703bbc4e2b99
2019-12-06 15:48:53 -06:00
Alan Meadows
7eeb529053 Initial commit for document pkg library
This introduces two new interfaces to airshipctl:

* Bundle: represents a Kustomize rendered
collection of your documents that allows you to
iterate over or filter the documents in the bundle.

* Document: a thin wrapper around a rendered
document.

This commit also includes a proposal for a way to
represent YAML test fixtures as testdatafs.go
and a new testdata subfolder within the document
pkg.

Change-Id: I4282b27977617552c25c5ae2c3b7da44e67dd014
2019-10-04 14:22:26 -07:00
Ian Howell
129ccb3e3e Add a configuration file for golangci-lint
This adds the .golangci.example.yaml, allowing for more precise control
over how linting is done.

This configuration is highly opinionated and is subject to change.

Change-Id: Ida13bf0dca12e152b75427f5060ad4931e426c72
2019-07-15 12:11:08 -05:00