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

Move certifications to common #215

Merged
merged 10 commits into from
Oct 3, 2016
Merged

Move certifications to common #215

merged 10 commits into from
Oct 3, 2016

Conversation

jcscottiii
Copy link
Member

@jcscottiii jcscottiii commented Aug 19, 2016

Add interface for certification to common.
Addresses https://github.com/opencontrol/compliance-masonry/pull/212/files#r74363210 by using GetStandard instead of GetStandards

A future PR will include the mock for it once the common package is cleaned up as talked about in #213

@codecov-io
Copy link

codecov-io commented Aug 19, 2016

Current coverage is 92.74% (diff: 98.64%)

Merging #215 into master will increase coverage by 1.49%

@@             master       #215   diff @@
==========================================
  Files            29         31     +2   
  Lines           903        937    +34   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            824        869    +45   
+ Misses           65         55    -10   
+ Partials         14         13     -1   

Powered by Codecov. Last update abd21ce...1f65776

@jcscottiii
Copy link
Member Author

@afeld This should be ready

familySummaryMap[newFamily] += exportLink(controlFullName, componentLink)
summary += "\t" + exportLink(controlFullName, filepath.Join("standards", componentLink))
})
}
return summary, &familySummaryMap
}
Copy link
Member

Choose a reason for hiding this comment

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

This is a pretty large function...can we split it up so it's easier to follow?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's hard to break up this logic completely. i added some wrappers to some repeated logic to DRY it up and added comments.

Copy link
Member

Choose a reason for hiding this comment

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

How about making the body of the inner for loop a buildControlSummary() function?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@afeld
Copy link
Member

afeld commented Aug 22, 2016

Just one thing—looks good otherwise!

@jcscottiii
Copy link
Member Author

Also solves #224

// if there is more left, append the hyphen
name = fmt.Sprintf("%s%s-", name, fileNamePart)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this what strings.Join() does?

Copy link
Member Author

Choose a reason for hiding this comment

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

doh. yep!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,65 @@
package certifications
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to need any unexported(?) identifiers...can we make it the certifications_test package, for better separation?

Copy link
Member Author

Choose a reason for hiding this comment

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

will do

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,55 @@
package certification
Copy link
Member

Choose a reason for hiding this comment

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

Ditt about the certification_test package.

Copy link
Member Author

Choose a reason for hiding this comment

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

will do

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@afeld afeld merged commit 38f90d6 into master Oct 3, 2016
@jcscottiii jcscottiii deleted the move-certifications-interface branch October 4, 2016 18:43
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.

3 participants