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

preserve file permission when writing formatted files #1636

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

hohobilly
Copy link
Contributor

@hohobilly hohobilly commented Aug 2, 2023

Describe the PR
Attempt to fix #1635

Relation issue
#1635

Additional context
Read the original file information and run a chmod to the new file.
Add a test case to validate file permission after format.

test: add a test case to validate permission equal
@hohobilly hohobilly changed the title feat: preserve file permission when write formatted files preserve file permission when writing formatted files Aug 2, 2023
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch coverage: 20.00% and project coverage change: -0.09% ⚠️

Comparison is base (27b27bd) 83.68% compared to head (ffb8b3e) 83.60%.

❗ Current head ffb8b3e differs from pull request most recent head e3ee2fa. Consider uploading reports for the commit e3ee2fa to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1636      +/-   ##
==========================================
- Coverage   83.68%   83.60%   -0.09%     
==========================================
  Files          19       19              
  Lines        3813     3818       +5     
==========================================
+ Hits         3191     3192       +1     
- Misses        530      532       +2     
- Partials       92       94       +2     
Files Changed Coverage Δ
format/format.go 85.96% <20.00%> (-6.35%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sdghchj sdghchj merged commit 9f128b4 into swaggo:master Aug 9, 2023
9 checks passed
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.

fmt does not preserve file permissions
2 participants