Merged
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
- Introduced tests for updating language configurations based on detected tools, including scenarios for empty tools and unknown tools. - Added tests for detecting file extensions in both single files and directories, ensuring accurate recognition of supported file types. - Implemented tests for relevant tool detection based on file extensions, covering various programming languages and file types. - Enhanced error handling tests for non-existent paths and empty directories to ensure robustness in configuration management.
…ation files - Enhanced the `BuildDefaultConfigurationFiles` function to select tool UUIDs based on their versions. - Introduced a new helper function `selectCorrectToolUUID` for better clarity and maintainability. - Updated the expected PMD version in the integration test configuration files to 7.11.0. - Simplified cleanup logic in integration tests by consolidating the cleanup function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the configuration discovery and setup logic in the CLI tool, focusing on transitioning from language-based detection to tool-based detection. It also includes enhancements to file handling, configuration updates, and test coverage. Below is a summary of the most important changes grouped by theme.
Transition to Tool-Based Detection
DetectLanguages) with tool-based detection (DetectRelevantTools) incmd/config.go, updating associated logic and error messages accordingly. [1] [2]updateLanguagesConfigForToolsfunction to directly use detected tools for configuration updates, removing complex merging logic.updateCodacyYAMLForToolsto handle detected tools instead of languages, streamlining the addition of new tools to the configuration file. [1] [2]Enhancements to Tool Configuration Logic
selectCorrectToolUUIDfunction to dynamically determine the correct UUID for tools based on their versions, addressing special cases like PMD and ESLint.Improvements to File Handling
DetectFileExtensionsto handle both single files and directories, improving flexibility in file extension detection.Test Coverage Expansion
updateLanguagesConfigForToolsandupdateCodacyYAMLForTools, including edge cases such as empty tools, unknown tools, and directory creation.Miscellaneous Updates
slicesimport fromcmd/config.go, improving code cleanliness.7.11.0).