motoko-compiler-warnings-fixes

Installation
SKILL.md

Fixing Motoko Compiler Warnings

How to Run the Build Check

For DFX projects:

dfx build --check 2>&1 | tee /tmp/dfx_build_output.txt

This type-checks all canisters without deploying. Redirect stderr to capture warnings. The build takes several minutes for large projects.

For MOPS packages:

find src -type f -name "*.mo" -print0 | xargs -0 -n1 $(mops toolchain bin moc) --check $(mops sources) 2>&1 | tee /tmp/moc_check_output.txt

This uses moc --check on each file individually to avoid excessive warnings. It is often faster than a full dfx build --check and is ideal for standalone Motoko packages.

Related skills
Installs
25
First Seen
14 days ago