-
Notifications
You must be signed in to change notification settings - Fork 415
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
Detect compositions of {Naive}DateTime.utc_now and {Naive}DateTime.truncate #1074
Detect compositions of {Naive}DateTime.utc_now and {Naive}DateTime.truncate #1074
Commits on Oct 1, 2023
-
Add refactoring check suggesting to pass time unit to {Naive}DateTime…
….utc_now Instead of calling DateTime.utc_now and then truncating the result with DateTime.truncate/2, it's more efficient (and less code) to just pass a time unit indicating the desired precision to DateTime.utc_now directly. Dito for NaiveDateTime.
Configuration menu - View commit details
-
Copy full SHA for 1a28a23 - Browse repository at this point
Copy the full SHA 1a28a23View commit details -
Enable Credo.Check.Refactor.UtcNowTruncate check by default
I believe this refactoring is universally plausible, so let's enable it by default.
Configuration menu - View commit details
-
Copy full SHA for bff1668 - Browse repository at this point
Copy the full SHA bff1668View commit details
Commits on Dec 16, 2023
-
Update lib/credo/check/refactor/utc_now_truncate.ex
Co-authored-by: René Föhring <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ef89703 - Browse repository at this point
Copy the full SHA ef89703View commit details -
Update lib/credo/check/refactor/utc_now_truncate.ex
Co-authored-by: René Föhring <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 46e9ca6 - Browse repository at this point
Copy the full SHA 46e9ca6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 155b9d5 - Browse repository at this point
Copy the full SHA 155b9d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 728bf4d - Browse repository at this point
Copy the full SHA 728bf4dView commit details
Commits on Dec 29, 2023
-
This should be a quote from the source code, Credo.Check.add_column_if_missing/5 relies on this to calculate the column value for the issue.
Configuration menu - View commit details
-
Copy full SHA for aa498e1 - Browse repository at this point
Copy the full SHA aa498e1View commit details -
Correct line number for reported issues
The `line_no` value should be the line where the `trigger` appears, i.e. we should be using the meta information of the `truncate` AST node here.
Configuration menu - View commit details
-
Copy full SHA for 301397d - Browse repository at this point
Copy the full SHA 301397dView commit details