Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

style(change detection): some cleanup #834

Closed
wants to merge 1 commit into from

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Apr 2, 2014

No description provided.

@vicb vicb added cla: yes and removed cla: no labels Apr 2, 2014
@@ -805,11 +807,15 @@ class _EvalWatchRecord implements WatchRecord<_Handler>, Record<_Handler> {
break;
case _MODE_FIELD_CLOSURE_:
var closure = fn(_object);
value = closure == null ? null : Function.apply(closure, args, namedArgs);
value = closure == null ?
Copy link
Contributor

Choose a reason for hiding this comment

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

we use 100 columns, no need to wrap these, will revert on merge

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mhevery

Up to now I have always use 80 cls because:

  • It is a widely used convention,
  • It is also used in the Dart core code,
  • It allows seeing two files side by side.

I think we should consider making 80 the norm ?

Copy link
Contributor

Choose a reason for hiding this comment

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

As I had mentioned to Victor before: I think that we should opt to use the Dart formatter. IMHO, manual code formatting is mostly a waste of time. It is even more wasteful to have to go throw a push-review-edit-push cycled because of formatting issues. Use of an auto formatter would allow our time dedicated to Angular to be more optimally used. My 2 cents.

In previous projects I have used Eclipse's reformat & clean features. This is great when, like Angular, you have code being submitted from a diverse community.

vicb added a commit that referenced this pull request Apr 3, 2014
@vicb
Copy link
Contributor Author

vicb commented Apr 3, 2014

@chalin there's a PR/issue about hop, would you mind adding a note there to have a "verify coding convetion" rule ? I don't think auto-formatting is right as we've already discussed, but auto-checking is great

@chalin
Copy link
Contributor

chalin commented Apr 3, 2014

Done (#766). Btw, just to be clear, by "auto formatting" I mean having a tool (or command in the Dart Editor) that I can run and have the source (re-)formatted automatically. I don't mean auto formatting on checkin (which is what I may have mentioned to you before).

@zoechi
Copy link
Contributor

zoechi commented Apr 3, 2014

There is a dartfmt command included in Dart (it has an option for max line length - default 80)
In DartEditor it is Shift+Ctrl+R. I think this should use the preferences for max line length (there was a bug a while ago). dartfmt has a few bugs on edge cases but I use it anyway because I find doing this manually a waste of time too.

vicb added a commit that referenced this pull request Apr 3, 2014
@chalin
Copy link
Contributor

chalin commented Apr 3, 2014

@zoechi 👍

vicb added a commit that referenced this pull request Apr 3, 2014
@vicb vicb closed this in f7d173e Apr 3, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

4 participants