-
Notifications
You must be signed in to change notification settings - Fork 10
Update flowR lint and code-style #2013
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates flowR's code style and lint configuration by standardizing import statements and removing empty JSDoc comments. The changes primarily consolidate type imports using TypeScript's type keyword inline with value imports, and remove unnecessary blank lines from documentation comments throughout the codebase.
- Consolidates type and value imports into single import statements using inline
typekeyword - Removes empty JSDoc parameter separator lines (
*) - Adds placeholder JSDoc comments (
/** * */) to previously undocumented functions
Reviewed Changes
Copilot reviewed 289 out of 456 changed files in this pull request and generated 15 comments.
| File | Description |
|---|---|
| Multiple TypeScript files | Consolidated type imports with value imports using inline type keyword |
| Multiple TypeScript files | Removed empty JSDoc comment lines between parameter descriptions |
| Multiple TypeScript files | Added placeholder JSDoc comments to previously undocumented functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for splitComments is empty. Consider adding a description of what this function does, such as 'Splits tokens into comments and other tokens.'
| * | |
| * Splits the given tokens into comments and other tokens. | |
| * @param tokens - The array of tokens to split. | |
| * @returns An object containing arrays of comments and other tokens. |
| } | ||
|
|
||
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for normalizeExpressions is empty. Consider adding a description explaining the function's purpose and parameters.
| * | |
| * Normalizes a list of JSON tokens representing R expressions into an array of R AST nodes or delimiters. | |
| * @param data - The normalization context and state. | |
| * @param tokens - The list of JSON entries (with or without names) to normalize. | |
| * @returns An array of normalized R AST nodes and/or delimiters. |
| } | ||
|
|
||
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for parseNodesWithUnknownType is empty. Consider adding a description of the function's behavior and return value.
| * | |
| * Normalizes an array of nodes with unknown types by applying `normalizeSingleNode` to each element. | |
| * | |
| * @param data - The normalizer context and state. | |
| * @param mappedWithName - The array of nodes to normalize, or undefined. | |
| * @returns An array of normalized nodes or delimiters. |
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for normalizeDelimiter is empty. Consider documenting what this function does and its parameters.
| /** | |
| * | |
| /** | |
| * Normalizes a delimiter node from a NamedJsonEntry to an RDelimiter object. | |
| * | |
| * @param elem - The NamedJsonEntry representing the delimiter to normalize. | |
| * @returns An RDelimiter object with normalized structure. |
| import type { NamedJsonEntry } from '../../../json/format'; | ||
|
|
||
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for tryNormalizeWhile is empty. Consider adding a description of the function's purpose, parameters, and return value.
| * | |
| * Attempts to normalize a while-loop structure from a set of JSON tokens. | |
| * | |
| * @param data - The current normalizer context and state. | |
| * @param param1 - An array containing the tokens for the while keyword, left parenthesis, condition, right parenthesis, and body. | |
| * @returns An RWhileLoop node if the input represents a valid while-loop structure, or undefined if the first token is not a while keyword. | |
| * @throws {ParseError} If the structure is malformed (e.g., missing parentheses or invalid body/condition). |
| } | ||
|
|
||
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for isRNumber is empty. Consider documenting this type guard function.
| * | |
| * Type guard to check if a given node is an {@link RNumber}. | |
| * @param node The node to check. | |
| * @returns True if the node is an RNumber, false otherwise. |
| } | ||
|
|
||
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for deterministicPrefixIdGenerator is empty. Consider adding documentation explaining its purpose and parameters.
| * | |
| * Creates an ID generator that produces unique node IDs with a given string prefix. | |
| * @param prefix - The string prefix to prepend to each generated ID. | |
| * @param id - The starting number for the ID counter (default is 0). | |
| * @returns A function that generates unique IDs in the format `${prefix}-${id}`. |
| } | ||
|
|
||
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for sourcedDeterministicCountingIdGenerator is empty. Consider documenting the function's behavior and parameters.
| * | |
| * Creates an id generator that produces unique node ids by combining a file path, a source location, and a counter. | |
| * @param path - The file path or source identifier to include in the id. | |
| * @param location - The source range (start/end line/column) to include in the id. | |
| * @param start - The starting value for the counter (default is 0). | |
| * @returns A function that generates a unique NodeId string for each call. |
src/r-bridge/data/get.ts
Outdated
| const capabilityCache = new Map<FlowrCapabilityId, FlowrCapabilityWithPath>(); | ||
|
|
||
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for getCapabilityById is empty. Consider adding documentation explaining what capabilities are and how they're retrieved.
| * | |
| * Retrieves a capability by its unique identifier from the list of available Flowr capabilities. | |
| * | |
| * A "capability" represents a feature or function supported by the Flowr system. Capabilities may be nested, | |
| * forming a tree structure. This function searches through all capabilities (including nested ones) to find | |
| * the one with the matching `id`. The result includes the capability's data and its path within the tree. | |
| * | |
| * The function uses an internal cache to speed up repeated lookups. | |
| * | |
| * @param id - The unique identifier of the capability to retrieve. | |
| * @returns The capability object with its path in the tree. | |
| * @throws If no capability with the given id is found. |
src/r-bridge/data/get.ts
Outdated
| } | ||
|
|
||
| /** | ||
| * |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for getAllCapabilities is empty. Consider documenting what this function returns and its use case.
| * | |
| * Returns a flat array of all capabilities in the capabilities tree, each augmented with its path in the hierarchy. | |
| * This is useful for listing or searching all available capabilities, including nested ones. | |
| * @returns {readonly FlowrCapabilityWithPath[]} An array of all capabilities with their hierarchical paths. |
|
This pull request is included in v2.6.2 (see Release v2.6.2 (TS-Queries, new Domain Structure, more Reserved Words, removed Lineage Query)). |
No description provided.