-
Notifications
You must be signed in to change notification settings - Fork 311
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
Automatic format! #545
Automatic format! #545
Conversation
Polymer.AppScrollEffectsBehavior, | ||
Polymer.IronResizableBehavior | ||
], | ||
behaviors: [Polymer.AppScrollEffectsBehavior, Polymer.IronResizableBehavior], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At what point does the formatter decide to have each item on its own line (behaviors
, listeners
, and properties
)? This seems like it should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's using google styleguide, so I think it's after it hits 80 cols
app-drawer/app-drawer.d.ts
Outdated
|
||
interface HTMLElementTagNameMap { | ||
"app-drawer": AppDrawerElement; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typings for app-drawer are now missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that. is. not. supposed. to. happen. 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah this is because the missing semicolons caused a typescript syntax error
app-drawer/app-drawer.html
Outdated
@@ -283,8 +255,9 @@ | |||
this._boundEscKeydownHandler = this._escKeydownHandler.bind(this); | |||
this.addEventListener('keydown', this._tabKeydownHandler.bind(this)) | |||
|
|||
// Only listen for horizontal track so you can vertically scroll inside the drawer. | |||
this.listen(this, 'track', '_track'); | |||
// Only listen for horizontal track so you can vertically scroll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon above is causing this indentation.
app-drawer/app-drawer.html
Outdated
var t = this._FLING_INITIAL_SLOPE * dx / velocity | ||
this._styleTransitionDuration(t); | ||
var t = this._FLING_INITIAL_SLOPE * dx / | ||
velocity this._styleTransitionDuration(t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon
* whereas the rest of the elements will collapse below `sticky` element. | ||
* That is, the `sticky` element remains visible when the header is fully | ||
*condensed whereas the rest of the elements will collapse below `sticky` | ||
*element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no space between *
and text. Not a blocker, but curious why linter doesn't handle this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
odd.. it should clang-format does not
* | ||
* ```html | ||
* <link rel="import" href="/bower_components/app-layout/app-scroll-effects/app-scroll-effects.html"> | ||
* <link rel="import" | ||
* href="/bower_components/app-layout/app-scroll-effects/app-scroll-effects.html"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be an issue with the README generator (i.e. will it remove the *
in the HTML block), but maybe it's ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can tell it to not reflow comments do you think that's best? Otherwise clang-format does not support adding the space before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better if it enforces the line limits on all comments - code snippets in comments are a small use case, and I'm not even sure if the README generator is used on this repo anyways. Suggest you ignore this issue for now, and we'll deal with it if it's an issue later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make an issue in webmat, but I think this is an issue in the clang-format blackbox
fixes applied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update typing to get tests running on travis:
ERROR: Typings are stale. Please run "npm run update-types".
I was testing you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for travis config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retrying flaky test on IE 11 on Travis. LGTM otherwise.
LGTM |
Runs the experimental autoformatter webmat which runs clang-format on js files and makes it so that it can run on HTML files. Please look through this PR with
?w=1
in the diff to make sure that no logic was changed.What has changed?
You can run the formatter on the whole project by running
npm run format
and ex/include files from the formatter, and enter your custom clang-format config in a formatconfig.json see webmat readme for more