You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by rakatyal <gi...@git.apache.org> on 2015/08/29 04:43:16 UTC
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
GitHub user rakatyal opened a pull request:
https://github.com/apache/cordova-docs/pull/323
Adding linting, link verifier and slack and twitter badges
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rakatyal/cordova-docs raghav/linting
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-docs/pull/323.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #323
----
commit e8e775a27383f053b80777bb7e3f53013ad936f6
Author: Raghav Katyal <ra...@microsoft.com>
Date: 2015-08-29T02:39:37Z
Adding linting, link verifier and slack and twitter badges
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38268851
--- Diff: gulpfile.js ---
@@ -247,6 +250,23 @@ gulp.task("link-bugs", function (done) {
exec(bin("linkify-bugs.sh"), [path.join(SOURCE_DIR, "_posts")], done);
});
+gulp.task('lint', function() {
+ return gulp.src(path.join(LINT_DIR, "**", "*.html"))
+ .pipe(htmllint());
+});
+
+gulp.task('checklinks', function(cb) {
+ crawler.crawl('http://localhost:3000/')
+ .on('fetch404', function(queueItem, response) {
--- End diff --
Also, in our current website - almost all the broken links point to `#` which is technically valid but redundant- wonder if this is really caught by this tool - since it's not really a 404.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38258347
--- Diff: gulpfile.js ---
@@ -31,6 +33,7 @@ var WATCH_INTERVAL = 1000; // in milliseconds
var ROOT_DIR = ".";
var SOURCE_DIR = path.join(ROOT_DIR, "www");
var DEV_DIR = path.join(ROOT_DIR, "build-dev");
+var LINT_DIR = path.join(DEV_DIR, "blog");
--- End diff --
What is this directory?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38258345
--- Diff: www/_includes/footer.html ---
@@ -72,3 +74,6 @@
<script type="text/javascript" src="{{ site.baseurl }}/static/js/docs.js"></script>
<script type="text/javascript" src="{{ site.baseurl }}/static/js/main.js"></script>
<script type="text/javascript" src="{{ site.baseurl }}/static/js/index.js"></script>
+<script>
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
--- End diff --
What's this guy?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38374303
--- Diff: www/_includes/footer.html ---
@@ -72,3 +74,6 @@
<script type="text/javascript" src="{{ site.baseurl }}/static/js/docs.js"></script>
<script type="text/javascript" src="{{ site.baseurl }}/static/js/main.js"></script>
<script type="text/javascript" src="{{ site.baseurl }}/static/js/index.js"></script>
+<script>
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
--- End diff --
Cool, thanks!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38268864
--- Diff: gulpfile.js ---
@@ -247,6 +250,23 @@ gulp.task("link-bugs", function (done) {
exec(bin("linkify-bugs.sh"), [path.join(SOURCE_DIR, "_posts")], done);
});
+gulp.task('lint', function() {
--- End diff --
Ideally, build should use this task and not succeed if linting fails. How about `jslint`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by rakatyal <gi...@git.apache.org>.
Github user rakatyal commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38346729
--- Diff: www/_includes/footer.html ---
@@ -72,3 +74,6 @@
<script type="text/javascript" src="{{ site.baseurl }}/static/js/docs.js"></script>
<script type="text/javascript" src="{{ site.baseurl }}/static/js/main.js"></script>
<script type="text/javascript" src="{{ site.baseurl }}/static/js/index.js"></script>
+<script>
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
--- End diff --
This is for the twitter icon added on the footer to follow Apache Cordova.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38375651
--- Diff: gulpfile.js ---
@@ -247,6 +250,23 @@ gulp.task("link-bugs", function (done) {
exec(bin("linkify-bugs.sh"), [path.join(SOURCE_DIR, "_posts")], done);
});
+gulp.task('lint', function() {
+ return gulp.src(path.join(LINT_DIR, "**", "*.html"))
+ .pipe(htmllint());
+});
+
+gulp.task('checklinks', function(cb) {
+ crawler.crawl('http://localhost:3000/')
--- End diff --
A server should be running for this task to succeed, but a server should not be started every time this task runs. Let's instead encode this dependency by adding a statement like `console.log("Make sure the server is running on " + SERVE_URL + "before running this task.")` to the `'checklinks'` task.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by rakatyal <gi...@git.apache.org>.
Github user rakatyal closed the pull request at:
https://github.com/apache/cordova-docs/pull/323
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38373454
--- Diff: gulpfile.js ---
@@ -247,6 +250,23 @@ gulp.task("link-bugs", function (done) {
exec(bin("linkify-bugs.sh"), [path.join(SOURCE_DIR, "_posts")], done);
});
+gulp.task('lint', function() {
+ return gulp.src(path.join(LINT_DIR, "**", "*.html"))
+ .pipe(htmllint());
+});
+
+gulp.task('checklinks', function(cb) {
+ crawler.crawl('http://localhost:3000/')
--- End diff --
Why should it depend on the `serve` task?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38373786
--- Diff: gulpfile.js ---
@@ -247,6 +250,23 @@ gulp.task("link-bugs", function (done) {
exec(bin("linkify-bugs.sh"), [path.join(SOURCE_DIR, "_posts")], done);
});
+gulp.task('lint', function() {
+ return gulp.src(path.join(LINT_DIR, "**", "*.html"))
+ .pipe(htmllint());
+});
+
+gulp.task('checklinks', function(cb) {
+ crawler.crawl('http://localhost:3000/')
--- End diff --
Because it expects localhost:3000 to be present for this to work
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38373489
--- Diff: gulpfile.js ---
@@ -247,6 +250,23 @@ gulp.task("link-bugs", function (done) {
exec(bin("linkify-bugs.sh"), [path.join(SOURCE_DIR, "_posts")], done);
});
+gulp.task('lint', function() {
+ return gulp.src(path.join(LINT_DIR, "**", "*.html"))
+ .pipe(htmllint());
+});
+
+gulp.task('checklinks', function(cb) {
+ crawler.crawl('http://localhost:3000/')
+ .on('fetch404', function(queueItem, response) {
--- End diff --
It's not caught. This tool can't replace manual inspection entirely.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38373392
--- Diff: gulpfile.js ---
@@ -31,6 +33,7 @@ var WATCH_INTERVAL = 1000; // in milliseconds
var ROOT_DIR = ".";
var SOURCE_DIR = path.join(ROOT_DIR, "www");
var DEV_DIR = path.join(ROOT_DIR, "build-dev");
+var LINT_DIR = path.join(DEV_DIR, "blog");
--- End diff --
But this excludes the rest of the site too, which should be linted. Is there a way to tell `htmlverify` to exclude/ignore a path?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by rakatyal <gi...@git.apache.org>.
Github user rakatyal commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38346892
--- Diff: gulpfile.js ---
@@ -31,6 +33,7 @@ var WATCH_INTERVAL = 1000; // in milliseconds
var ROOT_DIR = ".";
var SOURCE_DIR = path.join(ROOT_DIR, "www");
var DEV_DIR = path.join(ROOT_DIR, "build-dev");
+var LINT_DIR = path.join(DEV_DIR, "blog");
--- End diff --
The directory where we want to run the lint. We can change it later as per use but currently the docs have a lot of formatting errors so I excluded it from linting.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on the pull request:
https://github.com/apache/cordova-docs/pull/323#issuecomment-136913243
Merged!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38268840
--- Diff: gulpfile.js ---
@@ -247,6 +250,23 @@ gulp.task("link-bugs", function (done) {
exec(bin("linkify-bugs.sh"), [path.join(SOURCE_DIR, "_posts")], done);
});
+gulp.task('lint', function() {
+ return gulp.src(path.join(LINT_DIR, "**", "*.html"))
+ .pipe(htmllint());
+});
+
+gulp.task('checklinks', function(cb) {
+ crawler.crawl('http://localhost:3000/')
--- End diff --
This gulp task should depend on `serve` task.
Nit: Also, the URL should be set for browser-link and used here as a constant - or get the default from browser-link if that's exposed instead of hardcoding this here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by rakatyal <gi...@git.apache.org>.
Github user rakatyal commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38476023
--- Diff: gulpfile.js ---
@@ -31,6 +33,7 @@ var WATCH_INTERVAL = 1000; // in milliseconds
var ROOT_DIR = ".";
var SOURCE_DIR = path.join(ROOT_DIR, "www");
var DEV_DIR = path.join(ROOT_DIR, "build-dev");
+var LINT_DIR = path.join(DEV_DIR, "blog");
--- End diff --
No. We would have to run the task for individual sub directories.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-docs pull request: Adding linting, link verifier and slack...
Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/323#discussion_r38373580
--- Diff: gulpfile.js ---
@@ -247,6 +250,23 @@ gulp.task("link-bugs", function (done) {
exec(bin("linkify-bugs.sh"), [path.join(SOURCE_DIR, "_posts")], done);
});
+gulp.task('lint', function() {
--- End diff --
Only when all linter errors are fixed, can we have build depend on lint. For now, it should be an independent task. We don't have jslint. I filed it as a separate feature to add, but it won't be in this PR.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org