Skip to content

Awesome CI Workflow Code formater: "2 files are not in one and only one directory" but they are in separate branches. #898

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

Closed
straight-into-the-wall opened this issue Oct 22, 2021 · 7 comments · Fixed by #900

Comments

@straight-into-the-wall
Copy link
Contributor

Hey @Panquesito7 @kvedala,

On my fork's Github Actions I got this error from Awesome CI Workflow Code formatter; even if I separated the two files into two different commits.

2 files are not in one and only one directory:
leetcode/src/1.c
leetcode/src/6.c

Error: Process completed with exit code 2.

Any idea how I could fix it?

Thanx

awesome_error

Originally posted by @straight-into-the-wall in #897 (comment)

@straight-into-the-wall straight-into-the-wall changed the title Hey @Panquesito7 @kvedala, Awesome CI Workflow Code formater: "2 files are not in one and only one directory" but they are in separate branches. Oct 22, 2021
@straight-into-the-wall
Copy link
Contributor Author

Now there is only one modified file, but the issue remains the same.
image

@Panquesito7
Copy link
Member

@ayaankhan98, @mishraabhinn, thoughts?

@straight-into-the-wall
Copy link
Contributor Author

Maybe is because I've 2 different PR affecting one folder? (Seems unlikely too me but I've no other clues)

#896

#897

@straight-into-the-wall
Copy link
Contributor Author

the failing check code is there:

  nodir_files = [file for file in cpp_files if file.count(os.sep) != 1 and "project_euler" not in file and "data_structure" not in file]
  if nodir_files:
    print(f"{len(nodir_files)} files are not in one and only one directory:")
    print("\n".join(nodir_files) + "\n")

@Panquesito7
Copy link
Member

Maybe is because I've 2 different PR affecting one folder? (Seems unlikely too me but I've no other clues)

#896

#897

Don't think so, that shouldn't happen. The Leetcode folder is known for having CI issues, AFAIK.

straight-into-the-wall added a commit to straight-into-the-wall/C that referenced this issue Oct 25, 2021
straight-into-the-wall added a commit to straight-into-the-wall/C that referenced this issue Oct 25, 2021
straight-into-the-wall added a commit to straight-into-the-wall/C that referenced this issue Oct 25, 2021
straight-into-the-wall added a commit to straight-into-the-wall/C that referenced this issue Oct 25, 2021
straight-into-the-wall added a commit to straight-into-the-wall/C that referenced this issue Oct 25, 2021
straight-into-the-wall added a commit to straight-into-the-wall/C that referenced this issue Oct 25, 2021
straight-into-the-wall added a commit to straight-into-the-wall/C that referenced this issue Oct 25, 2021
@straight-into-the-wall
Copy link
Contributor Author

straight-into-the-wall commented Oct 25, 2021

I found that Awesome workflow was counting the length of the modified file list in the number of undesired files.

I proposed a solution in PR #900.

@straight-into-the-wall
Copy link
Contributor Author

In former version of .github/workflows/awesome_workflow.yml commits were permitted to present multiple solutions at one time. PR #901 reuse that piece of code. So to give alternative solution to this issue.

Panquesito7 pushed a commit that referenced this issue Oct 25, 2021
…tory) (#900)

* perf: faster implementation of the TwoSum problem

* doc: fixed typos on comments

* updating DIRECTORY.md

* fix: comments on includes. Doxygen file. static test function

* fix: #898 awesome-workflow: 1 files are not in one and only one directory

* fix: revert 1.c changes

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
mishraabhinn pushed a commit that referenced this issue Oct 26, 2021
* perf: faster implementation of the TwoSum problem

* doc: fixed typos on comments

* updating DIRECTORY.md

* fix: comments on includes. Doxygen file. static test function

* fix: #898 revert the nodir_files check version prior 2c86fbb

* fix: revert 1.c changes

* Apply suggestions from code review

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <[email protected]>
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 a pull request may close this issue.

2 participants