dart_pre_commit
A small collection of pre commit hooks to format and lint dart code
6.1.4
10.0K downloads/mo
#2951 most downloaded on pub.dev
Skycoder42/dart_pre_commit
What this package is like to depend on
Last release 9 days ago
14 Aug 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 42 of 44 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
50 releases · first in 2020
7 releases in the last 12 months
see the full history below
Release timeline
50 releases · Oct 2020 to Aug 2026Releases
latest 50-
6.1.414 Aug 2026Release notes
Open source →Changelog
6.1.4 - 2026-08-14
Changed
- Updated min sdk version to ^3.13.0
- Updated dependencies
The package and it's documentation are available at pub.dev.
-
6.1.325 May 2026Release notes
Open source →Changelog
6.1.3 - 2026-05-25
Changed
- Updated min sdk version to ^3.12.0
- Updated dependencies
The package and it's documentation are available at pub.dev.
-
6.1.222 Apr 2026Release notes
Open source →Changelog
6.1.2 - 2026-04-22
Changed
- Updated min sdk version to ^3.11.0
- Updated dependencies
The package and it's documentation are available at pub.dev.
-
6.1.119 Feb 2026Release notes
Open source →Changelog
6.1.1 - 2026-02-19
Changed
- Updated min sdk version to ^3.11.0
- Updated dependencies
The package and it's documentation are available at pub.dev.
-
6.1.1+119 Feb 2026Release notes
Open source →Changelog
6.1.1+1 - 2026-02-19
Fixed
- Widen analyzer version constraints
The package and it's documentation are available at pub.dev.
-
6.1.022 Nov 2025Release notes
Open source →Changelog
6.1.0 - 2025-11-22
Changed
- Updated min sdk version to ^3.10.0
- Updated dependencies
Removed
- Removed support for custom_lint
- custom linter rules can now be provider via the new analyzer plugin system
The package and it's documentation are available at pub.dev.
Release notes
Open source →Changed
- Updated min sdk version to ^3.10.0
- Updated dependencies
Removed
- Removed support for custom_lint
- custom linter rules can now be provider via the new analyzer plugin system
-
6.0.009 Sep 2025Release notes
Open source →Changelog
6.0.0 - 2025-09-09
Changed
- Refactored project to use injectable/get_it instead of riverpod
- Close of APIs to only expose minimal required interfaces for a custom integration
The package and it's documentation are available at pub.dev.
Release notes
Open source →Changed
- Refactored project to use injectable/get_it instead of riverpod
- Close of APIs to only expose minimal required interfaces for a custom integration
-
5.4.815 Aug 2025Release notes
Open source →Changelog
5.4.8 - 2025-08-15
Changed
- Updated min sdk version to ^3.9.0
- Updated dependencies
The package and it's documentation are available at pub.dev.
-
5.4.730 Jul 2025Release notes
Open source →Changelog
5.4.7 - 2025-07-30
Changed
- Updated min sdk version to ^3.8.0
- Updated dependencies
The package and it's documentation are available at pub.dev.
-
5.4.623 Jul 2025Release notes
Open source →Changelog
5.4.6 - 2025-07-23
Changed
- Updated dependencies
- Updated min dart sdk to
3.8.0
The package and it's documentation are available at pub.dev.
-
5.4.518 Apr 2025Release notes
Open source →Fixed
- Fixed incompatibility with osv-scanner Version 2.0
- To keep using v1, add
legacy: trueto the scanner config
- To keep using v1, add
- Fixed incompatibility with osv-scanner Version 2.0
-
5.4.414 Mar 2025 -
5.4.317 Feb 2025 -
5.4.230 Dec 2024 -
5.4.129 Dec 2024Release notes
Open source →Changed
- Updated dependencies
- Updated min dart sdk to
3.6.0
Fixed
- Make pull-up-dependencies compatible with dart workspaces
-
5.4.013 Sep 2024Release notes
Open source →Added
- Added global configuration option
exclude(#4)- Allows to exclude files from analysis using regular expressions
- Added
ignore-unstaged-filestoanalyzeandcustom-linttasks (#31)- Allows to specify whether unstaged files should cause the tool to fail
- Can be combined with the global
excludeto fully exclude files
Changed
- Updated dependencies
- Updated min dart sdk to
3.5.0
- Added global configuration option
-
5.3.119 Aug 2024 -
5.3.011 Mar 2024Release notes
Open source →Changed
- Updated dependencies
- Updated min dart sdk to
3.3.0
Fixed
analyzetask now honorserror-levelsetting and will only fail if the analyzer fails as well (#30)- It will still log info/warning messages
Removed
- Removed the
scan-modeoption of theanalyzetask (#30)- It will now always scan the whole repository for issues
-
5.2.117 Aug 2023Release notes
Open source →Changed
- Update dependencies
- Major update of
analyzerto 6.* - Major update of
mocktailto 1.*
- Major update of
- Update dependencies
-
5.2.014 Jun 2023Release notes
Open source →Added
- Make osv-scanner task configurable
- Allows to specify a configuration file
- Allows to scan the whole repository instead of just the lockfile
Changed
- Update dependencies
Fixed
- Added documentation for custom-lint and osv-scanner tasks
- Only run custom-lint task if installed as dev dependency
- Make osv-scanner task configurable
-
5.2.0+128 Jun 2023 -
5.1.012 May 2023 -
5.1.0+117 May 2023 -
5.0.009 May 2023Release notes
Open source →Added
- Add support for running custom_lint as pre commit hook via
custom-linttask
Removed
- Removed
TestImportTaskandLibExportTask- superseded bycustom-lint
- Add support for running custom_lint as pre commit hook via
-
4.1.022 Feb 2023Release notes
Open source →Added
osv-scannerTask to automatically check for dependencies with security issues- Runs automatically, if the
osv-scannerbinary can be found - Scans the
pubspec.lockto check if any of the dependencies has a know vulnerability
- Runs automatically, if the
-
4.0.021 Oct 2022Release notes
Open source →Selected Changes
- Improved configuration of all tasks
- Task are now all configured via the pubspec.yaml
- Remove most of the task-related command line arguments
- Analysis level and scope can now be configured for the analyze task
- line length can now be configured for the format task
- Separate allow-lists for the outdated and pull up tasks
- Refactor lib export task to reliably handle staged files and to not run on projects not published to pub.dev
- Revamp public API
- made task implementations private
- split library into multiple parts
- Provide
DartPreCommit.runfor a simple entrypoint to invoke the hooks from code
- Hooks do not run anymore if no files for the given directory have been staged
- Improved configuration of all tasks
-
3.0.219 Jul 2022 -
3.0.2+115 Oct 2022Nothing published for this version
-
3.0.120 May 2022 -
3.0.004 Mar 2022Release notes
Open source →Added
FlutterCompatTask: Checks if a dart project can be added to a newly created flutter project. Useful to ensure that no package versions are required that are then what flutter currently supportsTestImportTask: Checks if any test files import library exports instead of sourcesLibExportTask: Checks if all src files that contain package public definitions are exported somewhere in lib
Changed
- Use dart_test_tools for CI/CD, code analysis and testing
- Enable all checks by default
- Add support for a configuration part in the pubspec.yaml
- For now, dependencies can be whitelisted for the outdated/pull-up tasks
- Updated dependencies
Removed
- fix imports task
- library imports task
- nullsafety task
-
2.3.306 Dec 2021 -
2.3.201 Jul 2021Release notes
Open source →Fixed
- The
analyzetask was not working anymore, as the output format ofdart analyzehas changed. The task was now adjusted to handle the new format only
- The
-
2.3.107 May 2021Release notes
Open source →Fixed
- The
library-importscan now be properly ignored by adding// dart_pre_commit:ignore-library-importbefore the line where the import happens
- The
-
2.3.030 Apr 2021Release notes
Open source →Added
- New Task
library-imports(#12)- Scans the source files (files under
lib/src) and test files - If any import in these files references a dart file that is a top level library, the task rejects
- Top-Level libraries are dart files under
lib, except those placed inlib/src
- Scans the source files (files under
Changed
- Change Mocking framework to mocktail
- New Task
-
2.2.029 Apr 2021Release notes
Open source →Added
- Basic Interface to create custom file and repository based tasks (#6)
- Made all tasks and helper classes public (#5)
- Added riverpod-based HooksProvider for easier use (replaces Hooks.create)
- Outdated task: Checks if any packages can be updated (#7)
- Nullsafe task: Checks if any packages can be updated to a nullsafe version (#7)
--[no-]ansiCLI option to explicitly enable/disable rich logging (#10)
Changed
- Migrated package to nullsafety
- Refactored Hooks API to allow custom hooks
- Generalized HookResult to be independent of specific tasks
- error has been removed, instead a Exceptions are thrown in case of fatal errors
- linter, pullUp have been replaced by the more generic rejected state
- refactor logger (#3)
- there is a pretty and a simple logger now
- the correct one is auto-detected based on the availability of a tty
- provides a useful status message so other logs/exceptions can be easily associated with the task
- debug-logging has been added to all tasks
- log-levels can be configured to show certain log messages
- Ported package to use freezed dataclasses
- Improved status icons
- Added
refreshparameter to logger interface - Updated dependencies
Fixed
- pull-up-dependencies now works in subdirs (#8)
- pull-up-dependencies now correctly handles nullsafety releases
- fix-imports can now handle multiline imports correctly (#9)
- this includes comments before, after or between the import and the
semicolon, as well as
as/show/hidestatements, that fall into a new line
- this includes comments before, after or between the import and the
semicolon, as well as
Removed
- Hooks.create was removed, use the provider instead
- TaskException was removed in favor of normal exceptions
-
2.2.0-nullsafety.208 Mar 2021 pre-releaseNothing published for this version
-
2.2.0-nullsafety.116 Feb 2021 pre-releaseNothing published for this version
-
2.2.0-nullsafety.003 Feb 2021 pre-releaseNothing published for this version
-
2.1.0-nullsafety.001 Feb 2021 pre-releaseNothing published for this version
-
2.0.0-nullsafety.128 Jan 2021 pre-releaseNothing published for this version
-
2.0.0-nullsafety.014 Jan 2021 pre-releaseNothing published for this version
-
1.1.410 Dec 2020Release notes
Open source →Fixed
- Include pubspec.yaml into analysis step
- Skip
dart analyze, if no files are to be analyzed
-
1.1.308 Dec 2020 -
1.1.204 Dec 2020Release notes
Open source →Fixed
- Fixed problem with repositories where the dart project folder beeing scanned is not the the git root folder
-
1.1.122 Oct 2020Release notes
Open source →Fixed
- Fixed bug that caused a crash in
--check-pull-upif dependencies declared in thepubspec.yamlare missing inpubspec.lock(#1)
- Fixed bug that caused a crash in
-
1.1.019 Oct 2020Release notes
Open source →Added
- Support for check if the version of dart dependencies can be pulled up to a higher version from the lockfile
-
1.0.209 Oct 2020 -
1.0.107 Oct 2020Release notes
Open source →Fixed
dart analyzenow treats lint infos as errors- Replace legacy dart tools in README
- Add missing await in program runner
-
1.0.007 Oct 2020 -
0.1.006 Oct 2020Nothing published for this version