Skip to content
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

Add support for Apache HTTP server ".htaccess" file and npm ".npmrc" file #985

Open
benoit-rolandeau-act opened this issue May 15, 2024 · 2 comments

Comments

@benoit-rolandeau-act
Copy link
Contributor

.htaccess

The .htaccess are configuration files for Apache HTTP server, see: https://httpd.apache.org/docs/2.4/en/howto/htaccess.html.

As written here:

[...] In general, .htaccess files use the same syntax as the
main configuration files. [...]

Source: https://httpd.apache.org/docs/2.4/en/howto/htaccess.html

Those files have the same format as: https://httpd.apache.org/docs/2.4/en/configuring.html#syntax. In this page it is said:

[...] Lines that begin with the hash character "#" are considered comments, and are ignored. Comments may not be included
on the same line as a configuration directive. White space occurring before a directive is ignored, so you may indent directives
for clarity. Blank lines are also ignored. [...]

Source: https://httpd.apache.org/docs/2.4/en/configuring.html#syntax

Therefore, I think the class to use is: PythonCommentStyle.

.npmrc

The .npmrc are npm config files, see: https://docs.npmjs.com/cli/v10/configuring-npm/npmrc.

As written here:

[...] All npm config files are an ini-formatted list of key = value parameters. [...] Lines in .npmrc files are interpreted as
comments when they begin with a ; or # character. .npmrc files are parsed by npm/ini,
which specifies this comment syntax. [...]

Source: https://docs.npmjs.com/cli/v10/configuring-npm/npmrc

Therefore, I think the classes to use could be: SemicolonCommentStyle or PythonCommentStyle. But because, the file is an ini file and we chose SemicolonCommentStyle for ini files, the best is to do the same and use SemicolonCommentStyle.

@benoit-rolandeau-act
Copy link
Contributor Author

I will do the update.

benoit-rolandeau-act added a commit to benoit-rolandeau-act/reuse-tool that referenced this issue May 15, 2024
Add support for Apache HTTP server ".htaccess" file and npm ".npmrc" file

refs fsfe#985
@benoit-rolandeau-act
Copy link
Contributor Author

Done, ready to be reviewed

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

No branches or pull requests

1 participant