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

Fix Astyle Project Option Detection when Placed with Source Files #3257

Merged

Conversation

jhlink
Copy link
Contributor

@jhlink jhlink commented Jul 30, 2020

Summary

In response to the bug reported by @cjappl, submitting a fix to resolve Issue #3256.

Changes

  • Add a test case detecting .astylerc when placed along a cpp source file.
    • Created a test_cpp_project dir containing .astylerc and dummy.cpp to support the test case.
  • Add the bug fix proposal by @hsanson to resolve issue.
  • Fixed test cases to reflect correct output from bug fix.

Closes Issue #3256

@jhlink
Copy link
Contributor Author

jhlink commented Jul 30, 2020

Hmm. I think the Travis CI - PR has been duplicated for some reason. The queued Travis check references the tests that were already run (and have passed).
If this is the case, the PR is ready to merge @hsanson !!

@cjappl
Copy link

cjappl commented Jul 30, 2020

@jhlink I can confirm that this works as intended and fixes the bug #3256 as intended! I have not checked out the tests, but the implementation is gold.

(finished - exit code 0) ['bash', '-c', '''astyle'' --project=.astylerc --stdin=''processorblocks/delayblock/test/test_DelayBlockBasics.cpp'' < ''/var/folders/n0/0fkj29b90q3_nlv8jkrxprr8m01t_4/T/nvim21wVXy/14/tes t_DelayBlockBasics.cpp''']

Thanks for the quick turnaround on this. And THANK YOU for implementing astyle in the first place, seriously appreciate it

hsanson
hsanson previously approved these changes Jul 30, 2020
Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

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

Thanks for the quick response in fixing this. I have tested with C/C++ small projects using .astylerc files in the root and works as expected.

@hsanson
Copy link
Contributor

hsanson commented Jul 30, 2020

Changes are ok and my limited tests show it works as advertised. Unfortunately the CI checks have not completed for some reason and I cannot merge this until they are finished.

@jhlink
Copy link
Contributor Author

jhlink commented Jul 31, 2020

Awesome. Thanks @hsanson !!

I'm stumped as to why CI is hanging. According to the build page, the run was successful. According to other forums, it seems more like a status update problem. 😕 But I guess I'll wait and see. If there's no change by tomorrow, I'll see if pushing an empty commit will change anything. 🤞

@jhlink
Copy link
Contributor Author

jhlink commented Jul 31, 2020

Lol... sometimes in power critical embedded applications, there's a "watchdog" program to wake the system in sleep mode when a condition is met. Typically, the trigger is some function that's named something along the lines of ... "kick the watchdog."

I think in this case, Travis just needed a good kick. 😆

@hsanson , we're good to go!!

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

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

Good to go.

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.

None yet

3 participants