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

Closed

Description

@straight-into-the-wall

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)

Activity

  1. 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.[/+] on Oct 22, 2021
  2. straight-into-the-wall commented on Oct 24, 2021

    @straight-into-the-wall
    ContributorAuthor

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

  3. Panquesito7 commented on Oct 24, 2021

    @Panquesito7
    Member
  4. straight-into-the-wall commented on Oct 24, 2021

    @straight-into-the-wall
    ContributorAuthor

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

    #896

    #897

  5. straight-into-the-wall commented on Oct 24, 2021

    @straight-into-the-wall
    ContributorAuthor

    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")
  6. Panquesito7 commented on Oct 24, 2021

    @Panquesito7
    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.

  7. straight-into-the-wall commented on Oct 25, 2021

    @straight-into-the-wall
    ContributorAuthor

    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.

  8. added 2 commits that reference this issue on Oct 25, 2021
  9. straight-into-the-wall commented on Oct 25, 2021

    @straight-into-the-wall
    ContributorAuthor

    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.

  10. added a commit that references this issue on Oct 25, 2021
    779e2f0
  11. added a commit that references this issue on Oct 26, 2021
    b8e3c38
  12. added 2 commits that reference this issue on Oct 31, 2021
    353a804
    235f0a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions