Skip to content

Conversation

@EagleoutIce
Copy link
Member

No description provided.

@EagleoutIce EagleoutIce linked an issue Nov 8, 2025 that may be closed by this pull request
@EagleoutIce EagleoutIce requested a review from Copilot November 8, 2025 18:20
Copy link

Copilot AI left a 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 type keyword
  • 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.

}

/**
*
Copy link

Copilot AI Nov 8, 2025

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.'

Suggested change
*
* 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 uses AI. Check for mistakes.
}

/**
*
Copy link

Copilot AI Nov 8, 2025

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.

Suggested change
*
* 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 uses AI. Check for mistakes.
}

/**
*
Copy link

Copilot AI Nov 8, 2025

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.

Suggested change
*
* 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 uses AI. Check for mistakes.
Comment on lines 6 to 7
/**
*
Copy link

Copilot AI Nov 8, 2025

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.

Suggested change
/**
*
/**
* 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.

Copilot uses AI. Check for mistakes.
import type { NamedJsonEntry } from '../../../json/format';

/**
*
Copy link

Copilot AI Nov 8, 2025

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.

Suggested change
*
* 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 uses AI. Check for mistakes.
}

/**
*
Copy link

Copilot AI Nov 8, 2025

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.

Suggested change
*
* 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 uses AI. Check for mistakes.
}

/**
*
Copy link

Copilot AI Nov 8, 2025

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.

Suggested change
*
* 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 uses AI. Check for mistakes.
}

/**
*
Copy link

Copilot AI Nov 8, 2025

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.

Suggested change
*
* 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.

Copilot uses AI. Check for mistakes.
const capabilityCache = new Map<FlowrCapabilityId, FlowrCapabilityWithPath>();

/**
*
Copy link

Copilot AI Nov 8, 2025

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.

Suggested change
*
* 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.

Copilot uses AI. Check for mistakes.
}

/**
*
Copy link

Copilot AI Nov 8, 2025

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.

Suggested change
*
* 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.

Copilot uses AI. Check for mistakes.
@EagleoutIce EagleoutIce merged commit 540ad74 into main Nov 8, 2025
19 checks passed
@EagleoutIce EagleoutIce deleted the 2012-chore-bump-flowr-lint branch November 8, 2025 20:00
@EagleoutIce
Copy link
Member Author

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)).

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

Successfully merging this pull request may close these issues.

[Chore] Bump flowr-lint

2 participants