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

Updates #24

Merged
merged 5 commits into from
Oct 8, 2014
Merged

Updates #24

merged 5 commits into from
Oct 8, 2014

Conversation

jzaefferer
Copy link
Owner

This PR mixes two fixes and two unrelated changes, though each commit is atomic and should be easy to review. I'm doing a single PR to ping some people just once, please take a look: @mislav (for the #22 fix), @gibson042 (for the #23 fix) and @scottgonzalez. Thanks!

@scottgonzalez
Copy link
Contributor

This looks good.

@jzaefferer
Copy link
Owner Author

I've added two commits, one fixing the missing space (will squash later), the other introducing lib/sanitize.js to clean up the commit message before validating it. This still assumes "#" is used as comment char. There's probably some way to retrieve the current config value, while falling back to the default, but that seems like a lot of effort for something that I've never heard of anyone making use of.

@@ -45,11 +44,14 @@ limits: {
}
```

* `component`: The default `true` requires a component, set to `false` to skip the check. Provide an array of strings to indicate what components are considered valid.

Choose a reason for hiding this comment

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

Looking at this again, it may be better to separate "component required" from "list of valid components" (e.g., component: true vs. components: [ "Build", "Test", "Core" ]), perhaps for hypothetical situations where component is optional but must come from the list if specified. I don't think it matters very much (certainly not with respect to jQuery), but thought it was worth raising for consideration.

@jzaefferer
Copy link
Owner Author

@gibson042 I've implemented that change. Makes the code a bit cleaner, too. And makes it easier to access the list for other purposes, like the one suggested in #25.

@mislav
Copy link

mislav commented Oct 7, 2014

On Tue, Oct 7, 2014 at 2:34 PM, Jörn Zaefferer notifications@github.com
wrote:

This still assumes "#" is used as comment char. There's probably some way
to retrieve the current config value, while falling back to the default,
but that seems like a lot of effort for something that I've never heard of
anyone making use of.

It's a core git feature, and I think it's a good idea to support these
features lest you risk your project to be broken for people with different
kinds of configurations.

You should just shell out to git config core.commentchar and default to
"#" if it's blank.

@jzaefferer
Copy link
Owner Author

You should just shell out to git config core.commentchar and default to
"#" if it's blank.

To do that synchronously in node I currently need to add a dependency on exec-sync, which has a compile step when installing. It also has a bunch of dependencies itself, both slow down the installation of this module a lot. I'll create a separate issue to address that issue at some point in the future, either when node has sync exec or someone actually runs into that problem. See #27.

I'll land this as-is for now and publish.

@jzaefferer jzaefferer merged commit 691799e into master Oct 8, 2014
@scottgonzalez
Copy link
Contributor

FYI: execSync() exists in node 0.11.

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.

5 participants