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

Guard against submitting _spec.* files and READMEs #273

Merged
merged 2 commits into from
Jan 21, 2016
Merged

Guard against submitting _spec.* files and READMEs #273

merged 2 commits into from
Jan 21, 2016

Conversation

daveyarwood
Copy link
Contributor

Closes #272.

I see that we allow users to submit test files if they include a --test flag (#189) -- should we do the same to allow submitting READMEs? If so, I propose we change the --test flag to a --force flag and let it apply to READMEs and any other files we may want to complain about in the future.

@Tonkpils
Copy link
Contributor

Nope, I don't think we ever want to allow submitting the README. This looks great :)

Tonkpils added a commit that referenced this pull request Jan 21, 2016
Guard against submitting _spec.* files and READMEs
@Tonkpils Tonkpils merged commit 113a259 into exercism:master Jan 21, 2016
@@ -17,8 +18,12 @@ func isTest(path string) bool {

file := filepath.Base(path)
name := file[:len(file)-len(ext)]
if name == "test" {
if name == "test" || name == "spec" {
Copy link
Member

Choose a reason for hiding this comment

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

perl doesn't have test or spec in the name, for what it's worth. Languages that have a different pattern for the test files have this defined in the language config, so we could expose it via the API (and perhaps write it to a dotfile somewhere that we can load and check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like that idea, seems much safer.
On Jan 21, 2016 2:37 PM, "Katrina Owen" [email protected] wrote:

In cmd/cmd.go
#273 (comment):

@@ -17,8 +18,12 @@ func isTest(path string) bool {

file := filepath.Base(path)
name := file[:len(file)-len(ext)]
  • if name == "test" {
  • if name == "test" || name == "spec" {

perl doesn't have test or spec in the name, for what it's worth. Languages
that have a different pattern for the test files have this defined in the
language config, so we could expose it via the API (and perhaps write it to
a dotfile somewhere that we can load and check.


Reply to this email directly or view it on GitHub
https://github.com/exercism/cli/pull/273/files#r50451141.

@kytrinyx
Copy link
Member

OK cool, I'll add an issue for it.

@kytrinyx
Copy link
Member

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