Skip to content

allow linebreaks in parsed wiki script #1470

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

Merged
merged 1 commit into from
Jan 26, 2017
Merged

allow linebreaks in parsed wiki script #1470

merged 1 commit into from
Jan 26, 2017

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 24, 2017

fix #1455, #1458

@mcarton
Copy link
Member

mcarton commented Jan 24, 2017

On a fresh wiki clone that produces

diff --git a/Home.md b/Home.md
index 03e3f02..da77539 100644
--- a/Home.md
+++ b/Home.md
@@ -358,7 +358,7 @@ let foo = 3.14;
 
 **Configuration:** This lint has the following configuration variables:
 
-* `blacklisted-names: Vec<String>`: The list of blacklisted names to lint about (defaults to `["foo", "bar", "baz", "quux"]`).
+* `blacklisted-names: Vec<String>`: The list of blacklisted names to lint about (defaults to `["foo", "bar", "baz", "quux"] `).
 
 # `block_in_if_condition_expr`
 
@@ -454,7 +454,7 @@ fn main() {
 
 **Configuration:** This lint has the following configuration variables:
 
-* `too-large-for-stack: u64`: The maximum size of objects (in bytes) that will be linted. Larger objects are ok on the heap (defaults to `200`).
+* `too-large-for-stack: u64`: The maximum size of objects (in bytes) that will be linted. Larger objects are ok on the heap (defaults to `200 `).
 
 # `builtin_type_shadow`
 
@@ -641,8 +641,7 @@ generics, not for using the `clone` method on a concrete type.
 **What it does:** Checks for comparisons to NaN.
 
 **Why is this bad?** NaN does not compare meaningfully to anything – not
-even itself – so those comparisons are simply wrong. You should rely on
-the `is_nan` method instead.
+even itself – so those comparisons are simply wrong.
 
 **Known problems:** None.
 
@@ -764,7 +763,7 @@ readable. Also LLVM will usually optimize small methods better.
 
 **Configuration:** This lint has the following configuration variables:
 
-* `cyclomatic-complexity-threshold: u64`: The maximum cyclomatic complexity a function can have (defaults to `25`).
+* `cyclomatic-complexity-threshold: u64`: The maximum cyclomatic complexity a function can have (defaults to `25 `).
 
 # `deprecated_semver`
 
@@ -1019,7 +1018,7 @@ enum Cake {
 
 **Configuration:** This lint has the following configuration variables:
 
-* `enum-variant-name-threshold: u64`: The minimum number of enum variants for the lints about variant names to trigger (defaults to `3`).
+* `enum-variant-name-threshold: u64`: The minimum number of enum variants for the lints about variant names to trigger (defaults to `3 `).
 
 # `eq_op`
 
@@ -1779,18 +1778,18 @@ let x = { 1; };
 **Default level:** Warn
 
 **What it does:** Checks for usage of any `LinkedList`, suggesting to use a
-`Vec` or a `VecDeque`.
+`Vec` or a `VecDeque` (formerly called `RingBuf`).
 
 **Why is this bad?** Gankro says:
 
 > The TL;DR of `LinkedList` is that it's built on a massive amount of pointers and indirection.
-> It wastes memory, it has terrible cache locality, and is all-around slow. `VecDeque`, while
+> It wastes memory, it has terrible cache locality, and is all-around slow. `RingBuf`, while
 > "only" amortized for push/pop, should be faster in the general case for almost every possible
 > workload, and isn't even amortized at all if you can predict the capacity you need.
 >
 > `LinkedList`s are only really good if you're doing a lot of merging or splitting of lists.
 > This is because they can just mangle some pointers instead of actually copying the data. Even
-> if you're doing a lot of insertion in the middle of the list, `VecDeque` can still be better
+> if you're doing a lot of insertion in the middle of the list, `RingBuf` can still be better
 > because of how expensive it is to seek to the middle of a `LinkedList`.
 
 **Known problems:** False positives – the instances where using a
@@ -1855,7 +1854,7 @@ let (a, b, c, d, e, f, g) = (...);
 
 **Configuration:** This lint has the following configuration variables:
 
-* `single-char-binding-names-threshold: u64`: The maximum number of single char bindings a scope may have (defaults to `5`).
+* `single-char-binding-names-threshold: u64`: The maximum number of single char bindings a scope may have (defaults to `5 `).
 
 # `map_clone`
 
@@ -3284,7 +3283,7 @@ fn foo(x: u32, y: u32, name: &str, c: Color, w: f32, h: f32, a: f32, b: f32) { .
 
 **Configuration:** This lint has the following configuration variables:
 
-* `too-many-arguments-threshold: u64`: The maximum number of argument a function or method can have (defaults to `7`).
+* `too-many-arguments-threshold: u64`: The maximum number of argument a function or method can have (defaults to `7 `).
 
 # `toplevel_ref_arg`
 
@@ -3366,7 +3365,7 @@ struct Foo { inner: Rc<Vec<Vec<Box<(u32, u32, u32, u32)>>>> }
 
 **Configuration:** This lint has the following configuration variables:
 
-* `type-complexity-threshold: u64`: The maximum complexity a type can have (defaults to `250`).
+* `type-complexity-threshold: u64`: The maximum complexity a type can have (defaults to `250 `).
 
 # `unicode_not_nfc`

which is still missing doc-valid-idents and has a trailing space in all default values.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 25, 2017

how do i generate the wiki to try it out locally?

@llogiq
Copy link
Contributor

llogiq commented Jan 25, 2017

python util/update_wiki.py

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 26, 2017

now it works (no more trailing whitespace, + the fix actually fixes something)

@mcarton mcarton merged commit c04eaf7 into rust-lang:master Jan 26, 2017
@mcarton
Copy link
Member

mcarton commented Jan 26, 2017

Thanks, I had not idea python's regex supported something like that.

@oli-obk oli-obk deleted the allow_multiline_config branch January 27, 2017 07:11
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 27, 2017

neither did I... I don't know any python to begin with ^^

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.

clippy.toml is undocumented
3 participants