Skip to content

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

@benoit-rolandeau-act

Description

@benoit-rolandeau-act

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions