Skip to content

CSSLint.verify() undocumentedly modifies ruleset argument in-place #458

@cvrebert

Description

@cvrebert

CSSLint.verify() calls applyEmbeddedRuleset(), which modifies the ruleset object _in-place_. This potential modification of the ruleset argument passed to verify() is not mentioned in verify()'s docs, which leads to bugs like gruntjs/grunt-contrib-csslint#26 when the caller attempts to verify multiple files against the same ruleset.

I propose that either the ruleset object should be defensively copied before modification, or a mention of this side-effect should be added to verify()'s docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions