-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Conversation
it('should throw if model is not a Date object', function() { | ||
compileInput('<input type="week" ng-model="secondWeek"/>'); | ||
|
||
expect(function() { | ||
scope.$apply(function(){ |
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 --- although I'd still like the function ()
vs function()
inconsistency fixed :< can wait for another CL.
Ok added a new commit for 'function()`. That was a lot haha. @caitp |
wunderbar~ |
Hah, changing the generated locale files... did you also change the JS in the locale files generator scripts? (i cant tell because the diff is too big) |
Not sure which ones are the generator scripts? |
under the |
Ok I'l have to do that since In the Gruntfile, So we'll probably want to add Although after doing that, there will probably be a lot of other changes that have to be made since jscs was never run on that folder. |
well it's generated code, so most of it is within string literals. The problem is that it will overwrite all the changes to src/ngLocale that you did when it's run again, and those files will start failing the linting |
Oh I see what you mean. |
So I'l remove all changes to any src/ngLocale files. |
yeah pretty much |
Hmm looks like I'm having some problems with running the generator. Not sure if i'm doing something weird. I tried running Created directory "../src/ngLocale/" angular.js/node_modules/q/q.js:126 But yeah, only one style change is needed for the generated files at line 113: looks like L89:
which has that space (I guess that's the toString() default) even though all the functions in |
it looks like the file is in the tree as |
74b23c8
to
5333736
Compare
Ok renamed it and I added
and not sure why.. looking at https://github.com/angular/angular.js/tree/master/src/ngLocale - it looks like those 4 aren't generated based on the last commit that regenerated the locale files? |
@@ -91,7 +91,8 @@ function pluralExtractor(content, localeInfo) { | |||
replace(/goog\.i18n\.pluralRules\.get_vf_/g, 'getVF'). | |||
replace(/goog\.i18n\.pluralRules\.get_wt_/g, 'getWT'). | |||
replace(/goog\.i18n\.pluralRules\.decimals_/g, 'getDecimals'). | |||
replace(/\n/g, ''); | |||
replace(/\n/g, '') | |||
replace(/function \(n/,'function(n'); |
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.
Shouldn't there be a space between arguments ? ;)
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.
Haha yeah good catch. I think that the validateParameterSeparator rule seems to only check for function (a, b, c) {
and we need to use disallowSpaceBeforeBinaryOperators and requireSpaceAfterBinaryOperators with ,
to check for spaces between arguments for actual function calls like 'asdf'.replace(a, b)
.
Although should I be running jscs on the other files too? Since now it's only checking files under 'src' and 'test'
7079822
to
88f1dd7
Compare
I pushed a commit that fixed the js in the generated scripts except the 4 mentioned above so I did those manually. Still need to figure out why those 4 aren't being created and why the build is failing though. |
the build failure looks like a flake to me |
if those files aren't being created, it's possible the closure build is out of date, or maybe some locales were removed from closure. run the closure update script and maybe clear out src/ngLocale's js files |
Ok, after clearing Yeah the last time Also there aren't references to those locales in the |
@eltacodeldiablo see caitp#1 --- when I run with those fixes (some of them are just extra) and do |
err -- I think I opened that PR wrong lol. Hang on. |
hzoo#1 there you go |
88f1dd7
to
3ef1523
Compare
From this: 0eb2c2a#diff-4c51149c7932e91d0b490a8427472ab6L2706 it looks like those 4 files are being used anymore so I removed them. |
This rule enforces a space after the curly brace for function declarations, anonymous function expressions, and named function expressions.
…OpeningRoundBrace, including i18n generator
3ef1523
to
d2d18f0
Compare
Oh ok I was able to rebase on top of master (also amended the commit message since it was the wrong rule to |
@caitp ah sorry accidentally closed |
Hmm --- so I guess if we aren't claiming to support those anymore, it's fine to get rid of them... but I feel like people will file bugs about that :( Well, lets worry about it later, I guess. |
Looks good to me, although I'd rather the re-generated files were in a separate commit than the jscs fix |
ok so you want the locale file changes in a separate commit? What about the ones in |
Well at least for For |
hopefully nobody wants to revert these arbitrary style rules we've added ;-; |
xp I think the last one for anonymous functions might be annoying to some folk. Although the code was 90% |
they will learn to deal with it :> |
Add rule disallowSpacesInFunctionDeclaration beforeOpeningRoundBrace.
Add rule disallowSpacesInNamedFunctionExpression beforeOpeningRoundBrace.
Add rule requireSpacesInFunction beforeOpeningCurlyBrace. Applies to all types of functions.
Didn't include spacing for round brace for anonymous functions yet.
Checking only anonymous function expressions: for
function (e)
, got 1121 times.Checking only anonymous function expressions: for
function(e)
, got 9159 times.cc: @caitp @petebacondarwin