Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dep script #26

Closed
wants to merge 2 commits into from
Closed

Dep script #26

wants to merge 2 commits into from

Conversation

aaron-prindle
Copy link
Contributor

This PR adds common boilerplate checking, linting, gofmt, and dep fixing scripts to our tests. I have disabled the linting from being run as I was getting errors with _wasm files. I believe it is related to this:
golangci/golangci-lint#206 although I was still experiencing the issue after updating and have disabled linting for now.

Copy link
Collaborator

@bobcatfish bobcatfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these @aaron-prindle !

I have 2 requests:

  1. Could you also update the DEVELOPMENT.md to explain a bit about test.sh?
  2. Could you update the commit message and/or add comments to the .sh scripts explaining where they came from (i.e. which repo)?

Some of these files will have overlap with functionality provided by prow / living in knative/test-infra (pointed out by @pivotal-nader-ziada in #14) but I think it's okay to add these for now - when we get to #15 we might end up removing some.

set -e

DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
BOILERPLATEDIR=$DIR/boilerplate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this directory exist?

# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for all the .sh scripts we add, can we include a comment block at the top explaining what they do and maybe an example of how to use them?

scripts=(
"hack/boilerplate.sh"
"hack/gofmt.sh"
# "hack/linter.sh" # TODO(aaron-prindle) lint codebase and add this back
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add an issue to the issue tracker to tackle this?

-E goimports \
-E golint \
-E interfacer \
# -E maligned \ # TODO(aaron-prindle) reorder structs by size to get passing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe an issue to track this as well?

Copy link
Contributor

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for changes already requested.

@bobcatfish
Copy link
Collaborator

@aaron-prindle I think in #66 the scripts in hack that we added made this PR no longer required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants