Skip to content
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

Make copyright year dynamic in coala.io #291

Merged
merged 1 commit into from Oct 29, 2018
Merged

Conversation

Vaibhav911
Copy link
Contributor

@Vaibhav911 Vaibhav911 commented Oct 27, 2018

This entrypoint ensures copyright year in foot of coala.io updates every
year automatically.
This helps in not updating the same every year.
Closes #290

includes/footer.html Outdated Show resolved Hide resolved
<span class="left">©
<script>
document.write(new Date().getFullYear());
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Trailing whitespaces.

Origin: SpaceConsistencyBear, Section: spacing.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpr9xhq323/includes/footer.html
+++ b/tmp/tmpr9xhq323/includes/footer.html
@@ -63,7 +63,7 @@
             <span class="left">© 
                 <script>
                     document.write(new Date().getFullYear());
-                </script> 
+                </script>
                 coala
             </span>
             <a class="grey-text text-lighten-4 right" href="#!">GNU AGPL v3.0</a>

@@ -60,7 +60,12 @@ <h5 class="white-text fine">coala</h5>
</div>
<div class="footer-copyright">
<div class="container">
<span class="left">© 2017 coala</span>
<span class="left">©
Copy link
Member

Choose a reason for hiding this comment

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

Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.

Origin: HTMLLintBear, Section: html.

<span class="left">©
<script>
document.write(new Date().getFullYear());
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.

Origin: HTMLLintBear, Section: html.

@TravisBuddy
Copy link

Travis tests have failed

Hey @Vaibhav911,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

docker run -v=$(pwd):/app --workdir=/app coala/base coala --ci
Unable to find image 'coala/base:latest' locally
latest: Pulling from coala/base
















Digest: sha256:125d6cf24929d39db47b3ccd83d6ed1b6a231fc7e8afbf70bc4b5bd87653b0ff
Status: Downloaded newer image for coala/base:latest
Executing section global...
Executing section linecount...
Executing section spacing...
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Trailing whitespaces.
|----|    | /app/includes/footer.html
|    |++++| /app/includes/footer.html
|  60|  60|     </div>
|  61|  61|     <div class="footer-copyright">
|  62|  62|         <div class="container">
|  63|    |-            <span class="left">© 
|    |  63|+            <span class="left">©
|  64|  64|                 <script>
|  65|  65|                     document.write(new Date().getFullYear());
|  66|  66|                 </script> 
[INFO][10:15:09] Applied 'ShowPatchAction' on 'includes/footer.html' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Trailing whitespaces.
|----|    | /app/includes/footer.html
|    |++++| /app/includes/footer.html
|  63|  63|             <span class="left">© 
|  64|  64|                 <script>
|  65|  65|                     document.write(new Date().getFullYear());
|  66|    |-                </script> 
|    |  66|+                </script>
|  67|  67|                 coala
|  68|  68|             </span>
|  69|  69|             <a class="grey-text text-lighten-4 right" href="#!">GNU AGPL v3.0</a>
[INFO][10:15:09] Applied 'ShowPatchAction' on 'includes/footer.html' from 'SpaceConsistencyBear'.
Executing section html...
[WARNING][10:15:10] HTMLLintBear: This result has no patch attached.
[WARNING][10:15:10] HTMLLintBear: This result has no patch attached.

includes/footer.html
|  63| ············<span·class="left">©·
|    | [MAJOR] HTMLLintBear:
|    | Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.

includes/footer.html
|  66| ················</script>·
|    | [MAJOR] HTMLLintBear:
|    | Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.
Executing section yml...
Executing section cli...
TravisBuddy Request Identifier: 30f49e10-d9d1-11e8-a99b-eb776290c7c8

@@ -60,7 +60,12 @@ <h5 class="white-text fine">coala</h5>
</div>
<div class="footer-copyright">
<div class="container">
<span class="left">© 2017 coala</span>
<span class="left">©
Copy link
Member

Choose a reason for hiding this comment

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

Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.

Origin: HTMLLintBear, Section: html.

<span class="left">©
<script>
document.write(new Date().getFullYear());
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.

Origin: HTMLLintBear, Section: html.

@@ -60,7 +60,12 @@ <h5 class="white-text fine">coala</h5>
</div>
<div class="footer-copyright">
<div class="container">
<span class="left">© 2017 coala</span>
<span class="left">©
Copy link
Member

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Trailing whitespaces.

Origin: SpaceConsistencyBear, Section: spacing.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpr9xhq323/includes/footer.html
+++ b/tmp/tmpr9xhq323/includes/footer.html
@@ -60,7 +60,7 @@
     </div>
     <div class="footer-copyright">
         <div class="container">
-            <span class="left">© 
+            <span class="left">©
                 <script>
                     document.write(new Date().getFullYear());
                 </script> 

<span class="left">©
<script>
document.write(new Date().getFullYear());
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Trailing whitespaces.

Origin: SpaceConsistencyBear, Section: spacing.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpr9xhq323/includes/footer.html
+++ b/tmp/tmpr9xhq323/includes/footer.html
@@ -63,7 +63,7 @@
             <span class="left">© 
                 <script>
                     document.write(new Date().getFullYear());
-                </script> 
+                </script>
                 coala
             </span>
             <a class="grey-text text-lighten-4 right" href="#!">GNU AGPL v3.0</a>

@Vaibhav911
Copy link
Contributor Author

Can someone clarify why it is showing this PR has issues?
I have removed all the trailing white spaces.

@Tyroc
Copy link

Tyroc commented Oct 27, 2018

Can't really help with the whitespace problem, but I think that the code in itself is not working. If i try your exact solution, my whole page gets overwritten and only the new Date is being displayed. However in the following solution everything works fine:

<span class="left">
    &copy;
    <span id="copyright">
        <script>document.getElementById('copyright').appendChild(document.createTextNode(new Date().getFullYear()))</script>
    </span>
    coala
</span>

Maybe try that.

Copy link

@srivama srivama left a comment

Choose a reason for hiding this comment

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

You need to squash both your commits into one. Please refer to coala.io/git for the same. Also, edit your commit message after squashing, using git commit -a --amend and write a more appropriate description. Entrypoint was used in the example with respect to bears and isn't required here:wink:

@Vaibhav911
Copy link
Contributor Author

@Tyroc Thnx for your suggestion. But your code is producing same output as mine in my machine. I have just changed the year part of the code. Rest html page is still the same. I don't know why your whole page is being overwritten with my code. Please correct me if I am wrong anywhere. Thnx once again.

@Tyroc
Copy link

Tyroc commented Oct 27, 2018

@Vaibhav911 Then there must be a problem with my machine. Sorry! Good contribution btw.

@Vaibhav911
Copy link
Contributor Author

Vaibhav911 commented Oct 28, 2018

@Tyroc, I guess you were right. if I run document.write after the document has loaded ,it overwrite the whole page. If it is run before that, it does not overwrite it. So I am using a little different approach now. Thank you so much for pointing out my mistake. I will correct it soon.

@@ -60,7 +60,12 @@ <h5 class="white-text fine">coala</h5>
</div>
<div class="footer-copyright">
<div class="container">
<span class="left">© 2017 coala</span>
<span class="left">©
Copy link
Member

Choose a reason for hiding this comment

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

Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.

Origin: HTMLLintBear, Section: html.

<span class="left">©
<script>
document.write(new Date().getFullYear());
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.

Origin: HTMLLintBear, Section: html.

@@ -60,7 +60,12 @@ <h5 class="white-text fine">coala</h5>
</div>
<div class="footer-copyright">
<div class="container">
<span class="left">© 2017 coala</span>
<span class="left">©
Copy link
Member

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Trailing whitespaces.

Origin: SpaceConsistencyBear, Section: spacing.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpr9xhq323/includes/footer.html
+++ b/tmp/tmpr9xhq323/includes/footer.html
@@ -60,7 +60,7 @@
     </div>
     <div class="footer-copyright">
         <div class="container">
-            <span class="left">© 
+            <span class="left">©
                 <script>
                     document.write(new Date().getFullYear());
                 </script> 

<span class="left">©
<script>
document.write(new Date().getFullYear());
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Trailing whitespaces.

Origin: SpaceConsistencyBear, Section: spacing.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpr9xhq323/includes/footer.html
+++ b/tmp/tmpr9xhq323/includes/footer.html
@@ -63,7 +63,7 @@
             <span class="left">© 
                 <script>
                     document.write(new Date().getFullYear());
-                </script> 
+                </script>
                 coala
             </span>
             <a class="grey-text text-lighten-4 right" href="#!">GNU AGPL v3.0</a>

@TravisBuddy
Copy link

Travis tests have failed

Hey @Vaibhav911,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

docker run -v=$(pwd):/app --workdir=/app coala/base coala --ci
Unable to find image 'coala/base:latest' locally
latest: Pulling from coala/base
















Digest: sha256:125d6cf24929d39db47b3ccd83d6ed1b6a231fc7e8afbf70bc4b5bd87653b0ff
Status: Downloaded newer image for coala/base:latest
Executing section global...
Executing section linecount...
Executing section spacing...
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Tabs used instead of spaces.
|----|    | /app/includes/footer.html
|    |++++| /app/includes/footer.html
|  61|  61|     <div class="footer-copyright">
|  62|  62|         <div class="container">
|  63|  63|             <span class="left">
|  64|    |-	        ©
|    |  64|+            ©
|  65|  65| 		<script>
|  66|  66| 		    document.getElementById("current-year").innerHTML=new Date().getFullYear();
|  67|  67| 		</script>
[INFO][05:32:13] Applied 'ShowPatchAction' on 'includes/footer.html' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Tabs used instead of spaces.
|----|    | /app/includes/footer.html
|    |++++| /app/includes/footer.html
|  62|  62|         <div class="container">
|  63|  63|             <span class="left">
|  64|  64| 	        ©
|  65|    |-		<script>
|    |  65|+        <script>
|  66|  66| 		    document.getElementById("current-year").innerHTML=new Date().getFullYear();
|  67|  67| 		</script>
|  68|  68| 		<span id="current-year"></span>
[INFO][05:32:13] Applied 'ShowPatchAction' on 'includes/footer.html' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Tabs used instead of spaces.
|----|    | /app/includes/footer.html
|    |++++| /app/includes/footer.html
|  63|  63|             <span class="left">
|  64|  64| 	        ©
|  65|  65| 		<script>
|  66|    |-		    document.getElementById("current-year").innerHTML=new Date().getFullYear();
|    |  66|+            document.getElementById("current-year").innerHTML=new Date().getFullYear();
|  67|  67| 		</script>
|  68|  68| 		<span id="current-year"></span>
|  69|  69|                 coala
[INFO][05:32:13] Applied 'ShowPatchAction' on 'includes/footer.html' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Tabs used instead of spaces.
|----|    | /app/includes/footer.html
|    |++++| /app/includes/footer.html
|  64|  64| 	        ©
|  65|  65| 		<script>
|  66|  66| 		    document.getElementById("current-year").innerHTML=new Date().getFullYear();
|  67|    |-		</script>
|    |  67|+        </script>
|  68|  68| 		<span id="current-year"></span>
|  69|  69|                 coala
|  70|  70|             </span>
[INFO][05:32:13] Applied 'ShowPatchAction' on 'includes/footer.html' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Tabs used instead of spaces.
|----|    | /app/includes/footer.html
|    |++++| /app/includes/footer.html
|  65|  65| 		<script>
|  66|  66| 		    document.getElementById("current-year").innerHTML=new Date().getFullYear();
|  67|  67| 		</script>
|  68|    |-		<span id="current-year"></span>
|    |  68|+        <span id="current-year"></span>
|  69|  69|                 coala
|  70|  70|             </span>
|  71|  71|             <a class="grey-text text-lighten-4 right" href="#!">GNU AGPL v3.0</a>
[INFO][05:32:13] Applied 'ShowPatchAction' on 'includes/footer.html' from 'SpaceConsistencyBear'.
Executing section html...
[WARNING][05:32:13] HTMLLintBear: This result has no patch attached.
[WARNING][05:32:13] HTMLLintBear: This result has no patch attached.
[WARNING][05:32:13] HTMLLintBear: This result has no patch attached.
[WARNING][05:32:13] HTMLLintBear: This result has no patch attached.
[WARNING][05:32:13] HTMLLintBear: This result has no patch attached.

includes/footer.html
|  64| »   ········©
|    | [MAJOR] HTMLLintBear:
|    | Indentation: Do not use tabs: Remove the tabs.

includes/footer.html
|  65| »   »   <script>
|    | [MAJOR] HTMLLintBear:
|    | Indentation: Do not use tabs: Remove the tabs.

includes/footer.html
|  66| »   »   ····document.getElementById("current-year").innerHTML=new·Date().getFullYear();
|    | [MAJOR] HTMLLintBear:
|    | Indentation: Do not use tabs: Remove the tabs.

includes/footer.html
|  67| »   »   </script>
|    | [MAJOR] HTMLLintBear:
|    | Indentation: Do not use tabs: Remove the tabs.

includes/footer.html
|  68| »   »   <span·id="current-year"></span>
|    | [MAJOR] HTMLLintBear:
|    | Indentation: Do not use tabs: Remove the tabs.
Executing section yml...
Executing section cli...
TravisBuddy Request Identifier: d479d040-da72-11e8-8964-ad637cdcaaf8

@@ -60,7 +60,12 @@ <h5 class="white-text fine">coala</h5>
</div>
<div class="footer-copyright">
<div class="container">
<span class="left">© 2017 coala</span>
<span class="left">©
Copy link
Member

Choose a reason for hiding this comment

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

Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.

Origin: HTMLLintBear, Section: html.

<span class="left">©
<script>
document.write(new Date().getFullYear());
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Trailing Whitespace: Trailing white spaces are unnecessary and can complicate diffs: Remove the ' ' at the end of the line.

Origin: HTMLLintBear, Section: html.

@@ -60,7 +60,12 @@ <h5 class="white-text fine">coala</h5>
</div>
<div class="footer-copyright">
<div class="container">
<span class="left">© 2017 coala</span>
<span class="left">©
Copy link
Member

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Trailing whitespaces.

Origin: SpaceConsistencyBear, Section: spacing.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpr9xhq323/includes/footer.html
+++ b/tmp/tmpr9xhq323/includes/footer.html
@@ -60,7 +60,7 @@
     </div>
     <div class="footer-copyright">
         <div class="container">
-            <span class="left">© 
+            <span class="left">©
                 <script>
                     document.write(new Date().getFullYear());
                 </script> 

<span class="left">©
<script>
document.write(new Date().getFullYear());
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Trailing whitespaces.

Origin: SpaceConsistencyBear, Section: spacing.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpr9xhq323/includes/footer.html
+++ b/tmp/tmpr9xhq323/includes/footer.html
@@ -63,7 +63,7 @@
             <span class="left">© 
                 <script>
                     document.write(new Date().getFullYear());
-                </script> 
+                </script>
                 coala
             </span>
             <a class="grey-text text-lighten-4 right" href="#!">GNU AGPL v3.0</a>

©
<script>
document.getElementById("current-year").innerHTML=new Date().getFullYear();
</script>
Copy link
Member

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Tabs used instead of spaces.

Origin: SpaceConsistencyBear, Section: spacing.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpl9zy7y_2/includes/footer.html
+++ b/tmp/tmpl9zy7y_2/includes/footer.html
@@ -61,7 +61,7 @@
     <div class="footer-copyright">
         <div class="container">
             <span class="left">
-	        ©
+            ©
 		<script>
 		    document.getElementById("current-year").innerHTML=new Date().getFullYear();
 		</script>

@jayvdb
Copy link
Member

jayvdb commented Oct 29, 2018

@gitmate-bot ff

@jayvdb
Copy link
Member

jayvdb commented Oct 29, 2018

Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently ⚠️

@jayvdb jayvdb merged commit 2759b0f into coala:master Oct 29, 2018
@jayvdb
Copy link
Member

jayvdb commented Oct 29, 2018

Automated fastforward with GitMate.io was successful! 🎉

This entrypoint ensures copyright year in foot of coala.io
updates every year automatically.
This helps in not updating the same every year.

Closes coala#290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants