Missing export doc
Adds missing documentation for general (non local function) exports, needs ./tools/locale.lua and ./tools/build-doc.lua run.
Summary of Changes
Hello @NathanSnail, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request enhances the diagnostic capabilities of the system by introducing a new check for missing documentation on exported functions, methods, and fields. It ensures that all public interfaces are adequately documented with comments, parameter, and return type annotations, thereby improving code clarity and maintainability.
Highlights
- New Diagnostic for Exported Documentation: Introduces a new diagnostic check to identify missing documentation for general (non-local) exported functions, methods, and fields.
-
Expanded Diagnostic Messages: Adds specific error messages for missing comments, parameters, and return annotations for exported methods and fields in the
script.lualocale file. -
Refactored Documentation Helper: The
missing-doc-helper.luafile has been updated to include a more flexiblecheckFunctionNamedand a newcheckMethodfunction, allowing for broader application of documentation checks. -
Dedicated Diagnostic Implementation: A new file
missing-export-doc.luais added to implement the logic for detecting and reporting missing documentation for various forms of exported functions and methods. -
Comprehensive Test Coverage: New test cases are added in
test/diagnostics/missing-export-doc.luato validate the new diagnostic across different scenarios of exported functions and methods.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
Found a bug with this, ---@package annotation makes it think it's not documented.