Skip to main content

What’s new in DCM 1.22.0

· 8 min read

Cover

Today we’re excited to announce the release of DCM 1.22.0!

This release includes 15 new rules, DCM Teams Console improvements, ignore comment support for pubspec rules and the first version of our public roadmap.

info

In the next release we'll update the recommended preset to include new rules. If you use this preset, please be ready to address new warnings.

Let's go through the highlights of this release! (And you can find the full list of changes in our changelog)

Step-by-Step Guide to Integrate DCM with Open Source Dart & Flutter Packages: "Wolt Modal Sheet Use-case"

· 10 min read
Majid Hajian
Google Developer Expert

Cover

At DCM, we understand the importance of maintaining a high-quality codebase, especially in a project as widely used as the Wolt Modal Sheet package. This package provides developers with a powerful tool for implementing responsive modals with multiple pages, smooth transitions, and scrollable content within Flutter applications. However, as projects grow and evolve, ensuring code consistency and catching potential bugs early becomes increasingly critical, particularly when maintaining an open-source project that receives multiple pull requests from different contributors.

Before we start, we'd like to mention that we offer a free OSS license for Dart and Flutter open-source packages. Check out our pricing and contact us by clicking the "Looking for OSS license?" button.

In this guide, we will walk you through the process of integrating DCM into the Wolt Modal Sheet package, covering everything from the initial setup to configuring CI pipelines and addressing code issues.

What’s new in DCM 1.21.0

· 9 min read

Cover

Today we’re excited to announce the release of DCM 1.21.0!

This release includes 9 new rules, a reworked "banned-usage" rule, a new reporter format for SonarQube, a new "Guides" section in the documentation, and general UX improvements 🚀.

warning

❗️ "banned-usage" now works only for usages (e.g., method invocations or property accesses); use "avoid-banned-names" to ban declaration names

❗️ "ban-name" has been removed; use "avoid-banned-names" instead

Let's go through the highlights of this release! (And you can find the full list of changes in our changelog)

Improving Code Reviews - Tools and Practices for Dart and Flutter Projects

· 10 min read
Majid Hajian
Google Developer Expert

Cover

Code reviews are integral to the software development lifecycle, crucial in maintaining code quality and promoting team collaboration. In this blog, I want to explore the importance of code reviews, tools, and practices to enhance the code review process and emphasize best practices specific to Dart and Flutter development. We will also discuss advanced concepts like "Shifting Left" to integrate reviews earlier in the development cycle, minimizing issues before they propagate.

Why more code is not always a bad thing

· 15 min read
Majid Hajian
Google Developer Expert

There's a prevailing myth in software development that less code is always better. While concise code can benefit specific contexts, it doesn't necessarily equate to better code. Code quality, maintainability, and readability are often far more important than simply being less.

This article will explore why writing more code can often lead to better software, especially in Dart and Flutter applications. We'll focus on clarity, modularity, flexibility, robustness, and error handling. We'll also discuss the drawbacks of "magic" code and the importance of linting and rules in maintaining code quality.

What’s new in DCM 1.19.0

· 10 min read

Cover

Today we’re excited to announce the release of DCM 1.19.0!

This release includes 9 new rules (4 for Riverpod), proper support for codegen packages by the check-dependencies command, new summary output to sdterr for various reporters, new visualization of the statically resolved widget trees for analyze-widgets, new fix type for removing unused files (moved from check-unused-files), documentation updates and other DX improvements! 🚀

Let's go through the highlights of this release! (And you can find the full list of changes in our changelog)

Ensuring Consistent and High-Quality Code In Dart and Flutter Projects Through Continuous Integration (CI)

· 9 min read
Majid Hajian
Google Developer Expert

Maintaining consistent and high-quality code is necessary in the fast-paced software development world, especially in Flutter and Dart projects, as they are known for being speedy tools. Continuous Integration (CI) has emerged as a crucial practice that helps development teams achieve this goal. CI provides rapid feedback by integrating code frequently and automating various aspects of the development process, allowing teams to identify and rectify issues early.

ChallengesChallenges

This article explores the significance of CI in enforcing code quality and consistency, the role of lint tools, especially DCM, and practical examples of integrating these tools with CI pipelines.

What’s new in DCM 1.18.0

· 9 min read

Cover

Today we’re excited to announce the release of DCM 1.18.0!

This release includes 8 new rules, improved "New Version" notifications, new grouping option for IntelliJ plugin, automatic DCM version detection by the "setup-dcm" action and general UX improvements 🚀.

warning

❗️ All DCM versions prior to 1.11.0 have been discontinued.

❗️ "check-unnecessary-nullable" command has been removed.

Let's go through the highlights of this release! (And you can find the full list of changes in our changelog)

Enhancing Flutter/Dart code quality with pre-commit hooks

· 8 min read
Olivier Revial
Lead mobile developer at Steeple

Enhancing Flutter/Dart code quality with pre-commit hooks

On any real-world Flutter project (but any project, really...), you want to run an analyzer and a linter at some point to ensure your quality matches the baseline your team agreed on. If you've been following me for some time, you might know that I love a promising CI/CD pipeline (heck, I even wrote a series on the topic 🙃). I always recommend running these checks in your CI pipeline.

What’s new in DCM 1.17.0

· 11 min read

Cover

Today we’re excited to announce the release of DCM 1.17.0!

This release includes 9 new rules (3 for Riverpod 🔥), early access to the DCM Teams license management portal, per-package monorepo mode, global configuration with DCM version constrains and more 🚀.

info

The recommended preset has been updated and now includes some rules from 1.14.0, 1.15.0 and 1.16.0, so you may get new warnings if you use the build-in recommended preset or once you update the dart-code-metrics-presets package dependency.

warning

❗️ With the next release we plan to discontinue all DCM versions prior to 1.11.0.

If you're still using one of those, consider upgrading to a newer version.

Let's go through the highlights of this release! (And you can find the full list of changes in our changelog)