# Tauri Lint We'd like to start doing some automated validations to support doc improvements. The first goal of this is to document the compatibility of our APIs per-platform (starting with TypeScript). This is achieved through TypeDoc tags with the below syntax in the comment of an object: ``` /** * @linuxSupport: 1.0.0 * @macSupport: unsupported * @windowsSupport: 1.0.0 */ ``` I've already created a script that will extract and (roughtly) validate these comments directly from the AST here. It currently has a string that's in the format of a Markdown table that it's ready to output. ## High-Level Steps I could use some help with creating the GitHub action/workflow to wire it all together now. I'm thinking it would do the following: 1. Checkout the `tauri-apps/tauri` repo 2. Run the previously mentioned script (Node/TS) that parses through the TypeScript AST JSON file contained in the `tauri-apps/tauri` repo - Note that this file is currently not commited and needs to be generated - I think we can commit the file directly so we don't have to setup the whole TypeScript toolchain when we need the file - You can run `yarn && yarn generate-docs` in `tooling/api` and then the resulting file will be in `tooling/api/docs/js-api.json` 3. Takes the output of that script (text in the format of a Markdown table) and use it to update/create a GitHub issue - Probably can do an HTML comment trick to "fence" where the content is updated - `<!-- start-dashboard -->` - Bot inserts/updates table here - `<!-- end-dashboard -->` ## Parameters These are things that could be set by the user with a manual `workflow_dispatch` trigger: - `tauri_repo_ref`: Upstream `tauri-apps/tauri` ref so that we could run the action on whichever branch/tag we want - `ts_ast_filepath`: The filepath of the JSON AST in the upstream repo - `dashboard_issue`: The issue that should be updated with the resulting output ## Considerations - Starting off with just a TypeScript lint right now, but will most likely expand it to Rust in the future. Assume the same method outlined for TS will be used for Rust (a `.json` file passed to a script) - Don't know quite where this should be stored. I'm thinking it might be better to create a separate repo to begin with but then we could integrate it into the main Tauri repo and use it as an additional lint/check on PRs/commits there if wanted.