uber / cadence

Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
https://cadenceworkflow.io
MIT License
7.96k stars 772 forks source link

Skip .git folder when searching for *.go files #6118

Closed Groxx closed 3 weeks ago

Groxx commented 3 weeks ago

Apparently that was being searched, and it noticed a "thing.go" folder that git made! So now this has two improvements:

  1. it does not step into the .git folder, because obviously there is no source that needs formatting in there
  2. it only finds files, -type f, because directories aren't source files

Both pretty obviously good to have in retrospect.


A way to validate this kind of change for the future:

  1. change the SHELL = ... line near the top of the makefile to include a -x debug flag. make will now print all the $(shell ...) commands it runs, including this find.
  2. copy it and run it by hand and check the output. in particular, this time I just had it find all files to check where it looked, and made sure the list was reasonable (it included my local .idea, but that seems fine, it's small and has no go files)

I should've done 2 earlier when I added this find command, I likely would have noticed the directories and .git and removed them. Sorry about that.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.96%. Comparing base (590500c) to head (409fef7). Report is 6 commits behind head on master.

Additional details and impacted files [see 10 files with indirect coverage changes](https://app.codecov.io/gh/uber/cadence/pull/6118/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/uber/cadence/pull/6118?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/uber/cadence/pull/6118?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Last update [590500c...409fef7](https://app.codecov.io/gh/uber/cadence/pull/6118?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber).
coveralls commented 3 weeks ago

Pull Request Test Coverage Report for Build 018feaa8-4d2b-4152-bf5a-38f1696b2d57

Details


Files with Coverage Reduction New Missed Lines %
service/history/shard/context.go 2 78.36%
service/matching/tasklist/task_list_manager.go 2 76.45%
service/history/task/transfer_active_task_executor.go 2 72.77%
common/membership/hashring.go 2 84.69%
service/matching/tasklist/matcher.go 2 89.35%
common/task/fifo_task_scheduler.go 3 84.54%
service/history/task/fetcher.go 3 86.6%
common/types/mapper/thrift/shared.go 4 98.31%
service/history/task/transfer_standby_task_executor.go 6 87.35%
service/history/replication/task_processor.go 7 81.25%
<!-- Total: 521 -->
Totals Coverage Status
Change from base Build 018feaa3-8a65-4c9c-874c-0243b9141bed: -0.3%
Covered Lines: 105538
Relevant Lines: 148942

💛 - Coveralls