elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.72k stars 8.14k forks source link

Quicker option for running per-module doc stats #126037

Open matschaffer opened 2 years ago

matschaffer commented 2 years ago

When working on https://github.com/elastic/kibana/pull/125467#issuecomment-1041343811 I found I had increased the "Public APIs missing comments" count for the monitoring plugin, so I tried to fix that.

Unfortunately it's a little difficult to know exactly what to do.

I ran node scripts/build_api_docs --plugin monitoring --stats comments as the bot recommends, but that OOMed due to https://github.com/elastic/kibana/issues/125079

So I ran node --max-old-space-size=8192 scripts/build_api_docs --plugin monitoring --stats comments but that takes 12 minutes. And it's still a little unclear on what I'm supposed to do with the output.

I seemed to even highlight one of the internal properties of my config object (ui) so I added a comment to that as well (https://github.com/elastic/kibana/pull/125467/files#diff-40e7b7e2305403ec95099600b95bbd777b1711b190ad1cb154abe15b95f4fbceR106). It was really just a guess, but it seems like it worked. A 12 minute test cycle doesn't lend it self to exploring what the "right" way to fix these warnings are so once I got something it seemed happy with, I moved on.

It'd be nice if we had a way to run the checks for just the single module (today it seems to compute for all modules and just show you one).

Or I was also wondering if we could do the check as an eslint plugin per file.

Those seem to run quite quickly from IntelliJ (for example @kbn/eslint/no-restricted-paths) so it's easy to abide by the rule while developing.

elasticmachine commented 2 years ago

Pinging @elastic/kibana-operations (Team:Operations)