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

Added more scripts to tidy check #12243

Merged
merged 1 commit into from
Feb 18, 2014
Merged

Conversation

dguenther
Copy link
Contributor

Extends the license and formatting check to *.js files in src/doc and *.sh, *.pl, *.c, and *.h files in src/etc. As best as I could tell, these files should be covered under the Rust project license.

cc @brson: Do any other scripts need a license? I'd like to double-check that this PR closes #4534.

@adrientetar
Copy link
Contributor

I think codemirror-node.js is a lib and therefore shouldn't get the license boilerplate (althrough the fact that the original project is MIT makes this possible, and also probably the fact that CodeMirror's developer was once member of the core team).
I don't know what @brson thinks but I would probably whitelist it in src/etc/licenseck.py instead.

@@ -105,7 +115,9 @@ exports.runMode = function(string, modespec, callback) {
if (string == "\n")
accum.push("<br>");
else if (style)
accum.push("<span class=\"cm-" + exports.htmlEscape(style) + "\">" + exports.htmlEscape(string) + "</span>");
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just break the line after +, I think there's no need to split out onto different instructions.

@brson
Copy link
Contributor

brson commented Feb 16, 2014

Yes, let's whitelist codemirror-node.js and codemirror-rust.js, indicating that they are MIT licensed. It would probably be ok to put this license on them.

@dguenther
Copy link
Contributor Author

I changed the push function and the licenses on the codemirror-* files, thanks for looking!

@@ -422,7 +442,8 @@ CodeMirror.defineMode("rust", function() {
type = lexical.type, closing = firstChar == type;
if (type == "stat") return lexical.indented + indentUnit;
if (lexical.align) return lexical.column + (closing ? 0 : 1);
return lexical.indented + (closing ? 0 : (lexical.info == "match" ? altIndentUnit : indentUnit));
var text = (closing ? 0 : (lexical.info == "match" ? altIndentUnit : indentUnit));
return lexical.indented + text;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also just break the line at the + here.

@dguenther
Copy link
Contributor Author

Changed the line break there as well.

@adrientetar
Copy link
Contributor

r? @alexcrichton

bors added a commit that referenced this pull request Feb 17, 2014
Extends the license and formatting check to `*.js` files in `src/doc` and `*.sh`, `*.pl`, `*.c`, and `*.h` files in `src/etc`. As best as I could tell, these files should be covered under the Rust project license.

cc @brson: Do any other scripts need a license? I'd like to double-check that this PR closes #4534.
@dguenther
Copy link
Contributor Author

I think it was just a fluke, but I rebased against master anyway. r? @alexcrichton

bors added a commit that referenced this pull request Feb 18, 2014
Extends the license and formatting check to `*.js` files in `src/doc` and `*.sh`, `*.pl`, `*.c`, and `*.h` files in `src/etc`. As best as I could tell, these files should be covered under the Rust project license.

cc @brson: Do any other scripts need a license? I'd like to double-check that this PR closes #4534.
@bors bors closed this Feb 18, 2014
@bors bors merged commit b609d57 into rust-lang:master Feb 18, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 26, 2024
FIX(12243): redundant_guards

Fixed rust-lang#12243

changelog: Fix[`redundant_guards`]

I have made a correction so that no warning does  appear when y.is_empty() is used within a constant function as follows.

```rust
pub const fn const_fn(x: &str) {
    match x {
        // Shouldn't lint.
        y if y.is_empty() => {},
        _ => {},
    }
}
```
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.

Extend tidy license check to remaining source code
5 participants