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

Code cleanup: ArchiveRecord + impl moved into same Scala file #230

Merged
merged 1 commit into from
May 21, 2018

Conversation

lintool
Copy link
Member

@lintool lintool commented May 21, 2018

What does this Pull Request do?

Cleans up code for ArchiveRecord and adds documentation.

Copy link
Member

@ruebot ruebot left a comment

Choose a reason for hiding this comment

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

Question about blank line. Other than that, looks good and I'll merge when TravisCI turns green.

@codecov
Copy link

codecov bot commented May 21, 2018

Codecov Report

Merging #230 into master will increase coverage by 0.2%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #230     +/-   ##
=========================================
+ Coverage   59.87%   60.07%   +0.2%     
=========================================
  Files          39       39             
  Lines         770      774      +4     
  Branches      137      137             
=========================================
+ Hits          461      465      +4     
  Misses        268      268             
  Partials       41       41
Impacted Files Coverage Δ
...ain/scala/io/archivesunleashed/ArchiveRecord.scala 83.33% <83.33%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9649aa...ff1117b. Read the comment docs.

@@ -17,20 +17,111 @@

package io.archivesunleashed

import java.text.SimpleDateFormat

Copy link
Member

Choose a reason for hiding this comment

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

Weird. My comment from earlier is missing.

...do we need this blank line?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't find Scala style guides that dictate import, but for Java, it is common to have groups separated by blank lines, see http://checkstyle.sourceforge.net/config_imports.html

To quote, one common approach is:

  • group of static imports is on the top
  • groups of non-static imports: "java" and "javax" packages first, then "org" and then all other imports
  • imports will be sorted in the groups
  • groups are separated by, at least, one blank line

Copy link
Member

Choose a reason for hiding this comment

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

Ah, ok. That make sense. Let's just proceed with using that approach.

As an aside, I had the same problem trying to find guidelines on Scala style imports, and ended up doing it alphabetically, and soon realized order does matter at times. 🤷‍♂️

@ruebot ruebot merged commit e57a99c into master May 21, 2018
@ruebot ruebot deleted the code-style-refactoring branch May 21, 2018 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants