Skip to content

Commit

Permalink
Apply linter fixes
Browse files Browse the repository at this point in the history
Summary: Apply various linter fixes.

Test Plan: Eyeballed it.

Reviewers: chad, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9449
  • Loading branch information
joshuaspence authored and epriestley committed Jun 10, 2014
1 parent beb6490 commit bdb2af9
Show file tree
Hide file tree
Showing 38 changed files with 29 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -13,7 +13,7 @@
/support/jsast/jsast
/support/jsxmin/jsxmin

# Diviner artifacts
# Diviner artifacts
/docs/
/.divinercache/

Expand Down
1 change: 0 additions & 1 deletion LICENSE
Expand Up @@ -22,4 +22,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

2 changes: 0 additions & 2 deletions example/php-tictactoe/ai.php
Expand Up @@ -57,5 +57,3 @@ function check_win($game, $player) {

return false;
}


2 changes: 1 addition & 1 deletion example/php-typeahead/animals.txt
Expand Up @@ -179,4 +179,4 @@ wombat
woodchuck
yak
zebra
zebu
zebu
2 changes: 1 addition & 1 deletion pkg/init.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/javelin.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/typeahead.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/workflow.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions scripts/build.sh
Expand Up @@ -7,5 +7,3 @@ ROOT=`dirname $0`"/../"
(cd ${ROOT}support/javelinsymbols && make)
(cd ${ROOT}support/jsast && make)
(cd ${ROOT}support/jsxmin && make)


6 changes: 3 additions & 3 deletions specs/jasmine/jasmine.css
Expand Up @@ -4,11 +4,11 @@ body {


.jasmine_reporter a:visited, .jasmine_reporter a {
color: #303;
color: #303;
}

.jasmine_reporter a:hover, .jasmine_reporter a:active {
color: blue;
color: blue;
}

.run_spec {
Expand Down Expand Up @@ -59,7 +59,7 @@ body {
}

.suite .suite {
margin: 5px;
margin: 5px;
}

.suite.passed {
Expand Down
10 changes: 5 additions & 5 deletions specs/jasmine/jasmine.js
Expand Up @@ -116,7 +116,7 @@ jasmine.getEnv = function() {
* @returns {Boolean}
*/
jasmine.isArray_ = function(value) {
return jasmine.isA_("Array", value);
return jasmine.isA_("Array", value);
};

/**
Expand Down Expand Up @@ -963,7 +963,7 @@ jasmine.Block = function(env, func, spec) {
this.spec = spec;
};

jasmine.Block.prototype.execute = function(onComplete) {
jasmine.Block.prototype.execute = function(onComplete) {
try {
this.func.apply(this.spec);
} catch (e) {
Expand Down Expand Up @@ -1003,7 +1003,7 @@ jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
type: isSuite ? 'suite' : 'spec',
children: []
};

if (isSuite) {
var children = suiteOrSpec.children();
for (var i = 0; i < children.length; i++) {
Expand Down Expand Up @@ -1704,7 +1704,7 @@ jasmine.Queue.prototype.next_ = function() {

while (goAgain) {
goAgain = false;

if (self.index < self.blocks.length && !this.abort) {
var calledSynchronously = true;
var completedSynchronously = false;
Expand Down Expand Up @@ -1742,7 +1742,7 @@ jasmine.Queue.prototype.next_ = function() {
if (completedSynchronously) {
onComplete();
}

} else {
self.running = false;
if (self.onComplete) {
Expand Down
4 changes: 0 additions & 4 deletions src/core/__tests__/event-stop-and-kill.js
Expand Up @@ -33,7 +33,3 @@ describe('Event Stop/Kill', function() {
expect(target.getStopped()).toBe(true);
});
});




1 change: 0 additions & 1 deletion src/core/__tests__/install.js
Expand Up @@ -149,4 +149,3 @@ describe('Javelin Install', function() {
});

});

5 changes: 0 additions & 5 deletions src/docs/Base.js
Expand Up @@ -68,8 +68,3 @@ JX.install('Base', {

}
});





1 change: 0 additions & 1 deletion src/docs/concepts/behaviors.diviner
Expand Up @@ -179,4 +179,3 @@ The two major downsides to the behavior design appear to be:
have more than just glue code, and should have been refactored into a
real class some time ago. This is a pretty high-level drawback and is
manageable through awareness of the risk and code review.

1 change: 0 additions & 1 deletion src/docs/onload.js
Expand Up @@ -19,4 +19,3 @@ JX.onload = function(callback) {
// This isn't the real function definition, it's only defined here to let the
// documentation generator find it. The actual definition is in init.js.
};

1 change: 0 additions & 1 deletion src/ext/reactor/core/DynVal.js
Expand Up @@ -45,4 +45,3 @@ JX.install('DynVal', {
}));
}
});

1 change: 0 additions & 1 deletion src/ext/reactor/core/Reactor.js
Expand Up @@ -87,4 +87,3 @@ JX.install('Reactor', {
}
}
});

1 change: 0 additions & 1 deletion src/ext/reactor/core/ReactorNode.js
Expand Up @@ -94,4 +94,3 @@ JX.install('ReactorNode', {
}
}
});

1 change: 0 additions & 1 deletion src/ext/reactor/core/ReactorNodeCalmer.js
Expand Up @@ -45,4 +45,3 @@ JX.install('ReactorNodeCalmer', {
}
}
});

2 changes: 0 additions & 2 deletions src/ext/reactor/dom/RDOM.js
Expand Up @@ -402,5 +402,3 @@ JX.install('RDOM', {
}
}
});


1 change: 0 additions & 1 deletion src/ext/view/HTMLView.js
Expand Up @@ -133,4 +133,3 @@ JX.install('HTMLView', {
}
}
});

1 change: 0 additions & 1 deletion src/ext/view/View.js
Expand Up @@ -186,4 +186,3 @@ JX.install('View', {
}
}
});

1 change: 0 additions & 1 deletion src/ext/view/ViewRenderer.js
Expand Up @@ -16,4 +16,3 @@ JX.install('ViewRenderer', {
}
}
});

1 change: 0 additions & 1 deletion src/ext/view/ViewVisitor.js
Expand Up @@ -33,4 +33,3 @@ JX.install('ViewVisitor', {
}
}
});

1 change: 0 additions & 1 deletion src/lib/DOM.js
Expand Up @@ -891,4 +891,3 @@ JX.install('DOM', {
}
}
});

3 changes: 1 addition & 2 deletions src/lib/__tests__/URI.js
Expand Up @@ -262,7 +262,7 @@ describe('Javelin URI', function() {
expect(uri.toString()).toEqual('/?clown=town');
});

it('can remove non existant query data', function() {
it('can remove non existent query data', function() {
var uri = JX.$U('/?key=value');
uri.addQueryParams({'magic' : null});
expect(uri.getQueryParams()).toEqual({
Expand Down Expand Up @@ -300,4 +300,3 @@ describe('Javelin URI', function() {
});

});

1 change: 0 additions & 1 deletion src/lib/__tests__/behavior.js
Expand Up @@ -93,4 +93,3 @@ describe('Javelin Behaviors', function() {
});

});

Expand Up @@ -75,4 +75,3 @@ JX.install('TypeaheadCompositeSource', {
}
}
});

2 changes: 0 additions & 2 deletions src/lib/control/typeahead/source/TypeaheadOnDemandSource.js
Expand Up @@ -83,5 +83,3 @@ JX.install('TypeaheadOnDemandSource', {
}
}
});


3 changes: 0 additions & 3 deletions src/lib/control/typeahead/source/TypeaheadPreloadedSource.js
Expand Up @@ -57,6 +57,3 @@ JX.install('TypeaheadPreloadedSource', {
}
}
});



3 changes: 0 additions & 3 deletions src/lib/control/typeahead/source/TypeaheadStaticSource.js
Expand Up @@ -35,6 +35,3 @@ JX.install('TypeaheadStaticSource', {
}
}
});



2 changes: 1 addition & 1 deletion support/diviner/engine/JavelinDivinerEngine.php
Expand Up @@ -310,7 +310,7 @@ protected function parseMethod(array $ast, $as_function = false) {

protected function failParse(array $ast, $reason) {
throw new Exception(
"Parsing failed at line ".$this->getNodeLine($ast).": ".$reason);
'Parsing failed at line '.$this->getNodeLine($ast).': '.$reason);
}

protected function getObjectLiteralPropertyLine(array $ast, $property) {
Expand Down
4 changes: 2 additions & 2 deletions support/jsxmin/jsxmin_main.cpp
Expand Up @@ -26,9 +26,9 @@ static void jsxminify(NodeProgram* root, string &replacements) {

int main(int argc, char* argv[]) {
try {

string replacements(argc > 1 ? argv[1] : "");

// Create a node.
NodeProgram root(stdin);
jsxminify(&root, replacements);
Expand Down
2 changes: 1 addition & 1 deletion support/jsxmin/jsxmin_reduction.cpp
Expand Up @@ -15,7 +15,7 @@
*
* See accompanying file LICENSE.txt.
*
* @author Marcel Laverdet
* @author Marcel Laverdet
*/

#include "libfbjs/node.hpp"
Expand Down
6 changes: 3 additions & 3 deletions support/jsxmin/reduce.cpp
Expand Up @@ -15,7 +15,7 @@
*
* See accompanying file LICENSE.txt.
*
* @author Marcel Laverdet
* @author Marcel Laverdet
*/

#include "reduce.hpp"
Expand Down Expand Up @@ -197,8 +197,8 @@ void ReductionWalker::visit(NodeIf& node) {
++it;
Node* elseBlock = *it;
if (elseBlock == NULL) {
// If we're the child of a statement list, we can safely delete the
// whole if/else node. But if we're a child of an if statement, we can
// If we're the child of a statement list, we can safely delete the
// whole if/else node. But if we're a child of an if statement, we can
// not remove the node or we'll leave the parent with a surprising and
// segfaulty number of child nodes, e.g. if (x) {} else if (0) {}
if (dynamic_cast<NodeStatementList*>(parent()->node())) {
Expand Down
2 changes: 1 addition & 1 deletion support/jsxmin/reduce.hpp
Expand Up @@ -15,7 +15,7 @@
*
* See accompanying file LICENSE.txt.
*
* @author Marcel Laverdet
* @author Marcel Laverdet
*/

#pragma once
Expand Down

0 comments on commit bdb2af9

Please sign in to comment.