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

smartcontract: fix DO NOT EDIT warning to autogenerated files #3280

Merged
merged 1 commit into from
Dec 25, 2023

Conversation

AliceInHunterland
Copy link
Contributor

Change the order of comments

Closes #3254

Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (de98b39) 85.30% compared to head (1237c71) 85.21%.
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3280      +/-   ##
==========================================
- Coverage   85.30%   85.21%   -0.10%     
==========================================
  Files         327      327              
  Lines       44153    44248      +95     
==========================================
+ Hits        37664    37705      +41     
- Misses       5001     5047      +46     
- Partials     1488     1496       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -60,7 +60,9 @@ const (
// verification contract is circuit-specific, i.e. corresponds to a specific
// single constraint system. Thus, every new circuit requires vew verification
// contract to be generated and deployed to the chain.
goVerificationTmpl = `// Package main contains verification smart contract that uses Neo BLS12-381
goVerificationTmpl = `//Code generated by neo-go zkpbinding.GenerateVerifier; DO NOT EDIT.
//
Copy link
Member

Choose a reason for hiding this comment

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

but not be attached to the package clause

So it has to be a separate comment, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does it mean it needs space between two comments?

Copy link
Member

Choose a reason for hiding this comment

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

I think so. Try finding some similar tools and check how exactly it's structured there.

Like

// Code generated by "stringer -type=Role"; DO NOT EDIT.

But this doesn't have package-level documentation, unfortunately. My primary concern is correct package doc. You can check it with godoc though.

The text must appear as the first line of a properly formatted Go //
comment, and that comment must appear before but not be attached to the
package clause and before any /* */ comment.

Closes #3254

Signed-off-by: Ekaterina Pavlova <[email protected]>
@AnnaShaleva AnnaShaleva merged commit 6c88fcc into master Dec 25, 2023
17 of 19 checks passed
@AnnaShaleva AnnaShaleva deleted the do_not_edit branch December 25, 2023 11:56
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.

Imperfect "automatically generated" text
3 participants