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

New Lint Rule: Each source file should list at least one author annotation #1414

Closed
samreid opened this issue Jan 4, 2024 · 12 comments
Closed
Assignees

Comments

@samreid
Copy link
Member

samreid commented Jan 4, 2024

From a TODO in phetsims/projectile-data-lab#7, we would like to check that each file has at least one author annotation.

@samreid
Copy link
Member Author

samreid commented Jan 5, 2024

I added the lint rule and enabled it for projectile-data-lab. I temporarily enabled the rule project-wide to generate a chip-away report like so:

grunt lint-everything --disable-eslint-cache --chip-away

The result was:

Results from chipAway:

I don't know whether we will want to chip away at this or not. Or maybe just enable on a repo-by-repo basis as desired.

@samreid
Copy link
Member Author

samreid commented Jan 5, 2024

I wrote on slack dev-public:

For Projectile Data Lab, we wanted to make sure each file was annotated with at least one @author annotation. To make sure we didn’t miss anything, we added a new lint rule, described in #1414. I also ran the rule across our project to see how our @author coverage was across all our repos. The chip-away report is in #1414 (comment). Should we do anything about this, discuss it in dev meeting, or just enable repo-by-repo (opt in) as desired?

@pixelzoom
Copy link
Contributor

For anyone else wanting to work on fixes... The rule is author-annotation.js, and can be enabled in chipper/eslint/rules/.eslintrc.js

    // Each source file should list at least one author
    'author-annotation': 'off'

pixelzoom added a commit to phetsims/reactants-products-and-leftovers that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/balancing-chemical-equations that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/faradays-electromagnetic-lab that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/molecule-polarity that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/ph-scale-basics that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/concentration that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/nitroglycerin that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/unit-rates that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/diffusion that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/ph-scale that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/vegas that referenced this issue Jan 5, 2024
@pixelzoom
Copy link
Contributor

My repos were addressed in the above commits.

AgustinVallejo added a commit to phetsims/blackbody-spectrum that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/scenery-phet that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/twixt that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/kite that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/phetcommon that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/phet-core that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/griddle that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/tandem that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/mobius that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/bamboo that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/tambo that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/tappi that referenced this issue Jan 5, 2024
pixelzoom added a commit to phetsims/joist that referenced this issue Jan 5, 2024
jonathanolson added a commit that referenced this issue Jan 18, 2024
jonathanolson added a commit to phetsims/density that referenced this issue Jan 18, 2024
jonathanolson added a commit to phetsims/pendulum-lab that referenced this issue Jan 18, 2024
jonathanolson added a commit to phetsims/area-model-algebra that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/quake that referenced this issue Jan 18, 2024
matthew-blackman added a commit to phetsims/projectile-motion that referenced this issue Jan 18, 2024
@matthew-blackman matthew-blackman removed their assignment Jan 18, 2024
pixelzoom added a commit to phetsims/build-an-atom that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/energy-forms-and-changes that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/molecule-shapes-basics that referenced this issue Jan 18, 2024
@pixelzoom
Copy link
Contributor

pixelzoom commented Jan 18, 2024

I took care of many of @jbphet's repos, there are still 9 to do.

I discovered that @jonathanolson had apparently addressed most of his repos, but didn't tag this issue in commit, and didn't change those repos off in the list.

pixelzoom added a commit to phetsims/sun that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/states-of-matter that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/expression-exchange that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/gene-expression-essentials that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/number-line-integers that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/isotopes-and-atomic-mass that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/neuron that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/estimation that referenced this issue Jan 18, 2024
pixelzoom added a commit to phetsims/rosetta that referenced this issue Jan 18, 2024
pixelzoom added a commit that referenced this issue Jan 18, 2024
pixelzoom added a commit that referenced this issue Jan 18, 2024
pixelzoom added a commit that referenced this issue Jan 18, 2024
@pixelzoom
Copy link
Contributor

pixelzoom commented Jan 18, 2024

I addressed all remaining repos, did a pull-all, and saw no errors with grunt lint-everything --disable-eslint-cache. So I turned the author-annotation rule on.

@pixelzoom
Copy link
Contributor

Slack#developer:

PSA: I addressed all remaining violations of the ‘author-annotation’ lint rule. The rule is now enabled for all repos. Where @author was missing, I used the person who created the file, based on git history.

Slack#DM to @jonathanolson @jbphet @mattpen:

FYI… In localeInfo.js:

IMPORTANT - MUST READ!!!
You may modify this file with new locale information. After modifying the file you must take the following steps:
1. Run ./updateLocaleInfo.js, so that the automatically generated files are also update
2. Notify the responsible developers for rosetta, weddell, yotta, and the website that localeInfo was updated.

For #1414, all .js and .ts source files are required to have at least 1 @author annotation. So in 4065e2f, I added an @author annotation to the template in updateLocaleInfo.js, then ran node chipper/js/data/updateLocaleInfo.js which updated localeModuleInfo.js. The comment at the top of localeModuleInfo.js now looks like this:

/**
  * This file is automatically generated by js/data/updateLocaleInfo.js. Do not modify it directly.
  *
  * @author automatically generated by updateLocaleInfo.js
  */

@jbphet
Copy link
Contributor

jbphet commented Jan 30, 2024

Thanks @pixelzoom for handling to many of these!

zepumph pushed a commit to phetsims/perennial that referenced this issue Oct 22, 2024
zepumph pushed a commit to phetsims/perennial that referenced this issue Oct 22, 2024
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

No branches or pull requests

7 participants