Skip to content

Add pkgchk tool and integrate into CI#2925

Merged
jhendrixMSFT merged 3 commits intoAzure:latestfrom
jhendrixMSFT:pkgchk
Oct 11, 2018
Merged

Add pkgchk tool and integrate into CI#2925
jhendrixMSFT merged 3 commits intoAzure:latestfrom
jhendrixMSFT:pkgchk

Conversation

@jhendrixMSFT
Copy link
Copy Markdown
Member

@jhendrixMSFT jhendrixMSFT commented Oct 8, 2018

pkgchk will verify the following things:

  • package and directory names match
  • all lower-case characters in package path
  • directory for ARM packages are well-formed

Updated swagger->sdk to specify the preview-chk switch to verify that a
preview swagger has its codegen under a preview subdirectory.

  • The purpose of this PR is explained in this or a referenced issue.
  • The PR does not update generated files.
  • The PR targets the latest branch.
  • Tests are included and/or updated for code changes.
  • Updates to CHANGELOG.md are included.
  • Apache v2 license headers are included in each file.

@jhendrixMSFT jhendrixMSFT self-assigned this Oct 8, 2018
@ghost ghost added the review label Oct 8, 2018
@azuresdkci
Copy link
Copy Markdown

Can one of the admins verify this patch?

@jhendrixMSFT
Copy link
Copy Markdown
Member Author

Note this will fail until I finish cleaning up the repo (can't happen until Azure/azure-rest-api-specs#4089 is merged).

@jhendrixMSFT
Copy link
Copy Markdown
Member Author

Fixes most of #2907

@jhendrixMSFT jhendrixMSFT force-pushed the pkgchk branch 2 times, most recently from 672fbce to b7fd5d4 Compare October 9, 2018 23:05
@jhendrixMSFT
Copy link
Copy Markdown
Member Author

autorest.go 2.1.115 has dropped so we can move ahead with this PR.

pkgchk will verify the following things:
- package and directory names match
- all lower-case characters in package path
- directory for ARM packages are well-formed

Updated swagger->sdk to specify the preview-chk switch to verify that a
preview swagger has its codegen under a preview subdirectory.
Comment thread tools/pkgchk/cmd/root.go Outdated
Comment thread tools/pkgchk/cmd/root.go Outdated
Comment thread tools/pkgchk/cmd/root.go Outdated
return nil
}
regexStr := strings.Join([]string{
`^(?:/preview)?`,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is this regex tested ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

by that I mean the examples above are exhaustive ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

for ARM yes and the majority of packages match this pattern. there are just a handful of exceptions which is why I added the exceptions.txt mechanism.

Copy link
Copy Markdown

@vladbarosan vladbarosan left a comment

Choose a reason for hiding this comment

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

LGTM with some small suggestions

@jhendrixMSFT jhendrixMSFT merged commit 2ca43aa into Azure:latest Oct 11, 2018
@ghost ghost removed the review label Oct 11, 2018
@jhendrixMSFT jhendrixMSFT deleted the pkgchk branch October 11, 2018 21:11
jhendrixMSFT added a commit to jhendrixMSFT/azure-sdk-for-go that referenced this pull request Oct 15, 2018
* Add pkgchk tool and integrate into CI

pkgchk will verify the following things:
- package and directory names match
- all lower-case characters in package path
- directory for ARM packages are well-formed

Updated swagger->sdk to specify the preview-chk switch to verify that a
preview swagger has its codegen under a preview subdirectory.

* refactor based on feedback

* fix golint
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