Skip to content

Enhance configuration file handling, validate filename input and adjust paths#554

Open
stijnpotters1 wants to merge 3 commits into
masterfrom
fix/improve-config-path-ending
Open

Enhance configuration file handling, validate filename input and adjust paths#554
stijnpotters1 wants to merge 3 commits into
masterfrom
fix/improve-config-path-ending

Conversation

@stijnpotters1

Copy link
Copy Markdown
Contributor

Configuration overview now shows default Configuration.xml file that is created on default after creating a new configuration.
image

Added validation so you cannot end file or path with '/'
image
image

@stijnpotters1 stijnpotters1 requested a review from Matthbo June 17, 2026 10:04
@stijnpotters1 stijnpotters1 self-assigned this Jun 17, 2026
@stijnpotters1 stijnpotters1 linked an issue Jun 17, 2026 that may be closed by this pull request

@Matthbo Matthbo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss this PR next time we're both available

@stijnpotters1 stijnpotters1 requested a review from Matthbo June 22, 2026 12:18
@sonarqubecloud

Copy link
Copy Markdown

public String addConfiguration(String projectName, String configurationName) throws IOException, ApiException, TransformerException, ParserConfigurationException, SAXException {
ConfigurationProject configurationProject = configurationProjectService.getProject(projectName);
Path absProjectPath = fileSystemStorage.toAbsolutePath(configurationProject.getRootPath());
Path configDir = absProjectPath.resolve(CONFIGURATIONS_DIR).normalize();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the 'src/main/configurations' base path?

@stijnpotters1 stijnpotters1 Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because in the flow a configuration is opened which is already inside the src/main/configurations directory. So we do not have to set the additional src/main/configurations folder structure inside the configuration to add another configuration file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah so this has nothing to do with creating or opening a configuration?
We do want to enforce projects to put their configuration in <root>/src/main/configurations/<configuration name>/configuration.xml or later whatever the default name is for configuration.xml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it is for adding a file to a configuration, not the configuration itself

@stijnpotters1 stijnpotters1 requested a review from Matthbo June 24, 2026 07:56
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.

New Configuration file name / path shouldn't end in \ or /

2 participants