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

Fix whitespaces #2075

Merged
merged 1 commit into from
Sep 7, 2017
Merged

Fix whitespaces #2075

merged 1 commit into from
Sep 7, 2017

Conversation

chulkilee
Copy link
Contributor

@chulkilee chulkilee commented Sep 6, 2017

  • use LF for new line
  • remove trailing whitespaces, except two spaces at EOL in markdown
  • add missing new line at the end of file

@chulkilee
Copy link
Contributor Author

I think it would be better to have this one-time large commit than having individual commit with whitespaces changes on irrelevant parts.

@dtomcej
Copy link
Contributor

dtomcej commented Sep 6, 2017

How does this interact with our linters?

Is this something that we can add to our code cleaning tools to do automatically?

docs/basics.md Outdated
@@ -132,10 +132,10 @@ For instance, `PathPrefix: /products` would match `/products` but also `/product
Since the path is forwarded as-is, your backend is expected to listen on `/products`.

Use a `*Strip` matcher if your backend listens on the root path (`/`) but should be routeable on a specific prefix.
For instance, `PathPrefixStrip: /products` would match `/products` but also `/products/shoes` and `/products/shirts`.
Copy link
Contributor

Choose a reason for hiding this comment

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

2 spaces have a meaning in markdown.

When you do want to insert a
break tag using Markdown, you end a line with two or more spaces, then type return.
https://daringfireball.net/projects/markdown/syntax#p

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I didn't know that. Then here are options:

  • keep the two spaces at EOL
  • replace the two spaces at EOL with <br>
  • replace the two spaces at EOL with \n\n to separate paragraphs
  • use different formatting, such as !!! note or lists

I still don't like the significant trailing spaces since it's very easy to mess up. I think using <br> is better if <br> is really needed. Otherwise, the best option is to avoid <br> at all - use separate paragraphs or other formatting.

Let me know - I'll make changes in this PR accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

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

keep the two spaces at EOL

docs/basics.md Outdated
@@ -132,10 +132,10 @@ For instance, `PathPrefix: /products` would match `/products` but also `/product
Since the path is forwarded as-is, your backend is expected to listen on `/products`.

Use a `*Strip` matcher if your backend listens on the root path (`/`) but should be routeable on a specific prefix.
For instance, `PathPrefixStrip: /products` would match `/products` but also `/products/shoes` and `/products/shirts`.
Since the path is stripped prior to forwarding, your backend is expected to listen on `/`.
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

docs/basics.md Outdated
@@ -132,10 +132,10 @@ For instance, `PathPrefix: /products` would match `/products` but also `/product
Since the path is forwarded as-is, your backend is expected to listen on `/products`.

Use a `*Strip` matcher if your backend listens on the root path (`/`) but should be routeable on a specific prefix.
For instance, `PathPrefixStrip: /products` would match `/products` but also `/products/shoes` and `/products/shirts`.
Since the path is stripped prior to forwarding, your backend is expected to listen on `/`.
If your backend is serving assets (e.g., images or Javascript files), chances are it must return properly constructed relative URLs.
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

docs/basics.md Outdated
For instance, `PathPrefixStrip: /products` would match `/products` but also `/products/shoes` and `/products/shirts`.
Since the path is stripped prior to forwarding, your backend is expected to listen on `/`.
If your backend is serving assets (e.g., images or Javascript files), chances are it must return properly constructed relative URLs.
Continuing on the example, the backend should return `/products/shoes/image.png` (and not `/images.png` which Traefik would likely not be able to associate with the same backend).
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

docs/basics.md Outdated
@@ -208,7 +208,7 @@ Finally, you can create a rule to bind multiple domains or Path to a frontend, u

#### Rules Order

When combining `Modifier` rules with `Matcher` rules, it is important to remember that `Modifier` rules **ALWAYS** apply after the `Matcher` rules.
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@@ -355,7 +355,7 @@ requests periodically carried out by Traefik. The check is defined by a path
appended to the backend URL and an interval (given in a format understood by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration)) specifying how
often the health check should be executed (the default being 30 seconds).
Each backend must respond to the health check within 5 seconds.
By default, the port of the backend server is used, however, this may be overridden.
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no following lines after this line - this is the end of the paragraph. So I think it's okay to remove two spaces here.


- `id` (string): The id is the primary key.
- `name`(string): The name is used as the name of the frontend or backend.
- `frontend` or `backend` (map): This attribute's structure matches exactly the structure of a Frontend or Backend type in traefik.
See `types/types.go` for details.
Copy link
Contributor

Choose a reason for hiding this comment

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

same here


- `id` (string): The id is the primary key.
- `name`(string): The name is used as the name of the frontend or backend.
- `frontend` or `backend` (map): This attribute's structure matches exactly the structure of a Frontend or Backend type in traefik.
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@nmengin nmengin left a comment

Choose a reason for hiding this comment

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

LGTM 📖

- use LF for new line
- remove trailing whitespaces, except two spaces at EOL in markdown
- add missing new line at the end of file
@traefiker traefiker merged commit 8c55146 into traefik:v1.4 Sep 7, 2017
@chulkilee chulkilee deleted the fix-whitespace branch October 29, 2022 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants