Skip to content

Conversation

@xMasterX
Copy link
Contributor

What's new

  • Add fbt format and fbt clear to command list

Verification

  • fbt vscode_dist and press f1 and select tasks

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@sowavy234
Copy link

Review: Issues Found in tasks.json Configuration

I've reviewed the added VSCode tasks and identified several errors that need to be corrected:

Issues Identified:

  1. Incorrect group syntax - The group property should be an object {"kind": "build"}, not a string "build"
  2. Missing Windows compatibility - Commands using ./fbt won't work on Windows (should be fbt.cmd or fbt.bat)
  3. Missing newline at end of file - JSON files should end with a newline
  4. Missing problemMatcher - Tasks should include appropriate problem matchers for better VS Code integration

Corrected Configuration:

Here's the properly formatted version:

{
  "label": "[FBT] Format",
  "group": {
    "kind": "build"
  },
  "type": "shell",
  "command": "./fbt",
  "args": ["format"],
  "windows": {
    "command": "fbt.cmd",
    "args": ["format"]
  },
  "problemMatcher": []
},
{
  "label": "[FBT] Clear",
  "group": {
    "kind": "build"
  },
  "type": "shell",
  "command": "./fbt",
  "args": ["-c"],
  "windows": {
    "command": "fbt.cmd",
    "args": ["-c"]
  },
  "problemMatcher": []
},

Key Changes Explained:

  • group object format: VS Code's task schema requires group to be an object with a kind property for proper task categorization
  • args array: Separated command and arguments for better cross-platform compatibility and proper shell escaping
  • windows property: Provides Windows-specific command (fbt.cmd) ensuring the tasks work on both Unix and Windows environments
  • problemMatcher: Added empty array to suppress VS Code warnings (can be enhanced with custom matchers if needed)
  • File ending: Ensure the file ends with a newline character

These changes ensure the tasks work correctly across all platforms and follow VS Code's task configuration best practices.

@xMasterX
Copy link
Contributor Author

xMasterX commented Nov 1, 2025

Review: Issues Found in tasks.json Configuration

I've reviewed the added VSCode tasks and identified several errors that need to be corrected:

Issues Identified:

  1. Incorrect group syntax - The group property should be an object {"kind": "build"}, not a string "build"
  2. Missing Windows compatibility - Commands using ./fbt won't work on Windows (should be fbt.cmd or fbt.bat)
  3. Missing newline at end of file - JSON files should end with a newline
  4. Missing problemMatcher - Tasks should include appropriate problem matchers for better VS Code integration

Corrected Configuration:

Here's the properly formatted version:

{
  "label": "[FBT] Format",
  "group": {
    "kind": "build"
  },
  "type": "shell",
  "command": "./fbt",
  "args": ["format"],
  "windows": {
    "command": "fbt.cmd",
    "args": ["format"]
  },
  "problemMatcher": []
},
{
  "label": "[FBT] Clear",
  "group": {
    "kind": "build"
  },
  "type": "shell",
  "command": "./fbt",
  "args": ["-c"],
  "windows": {
    "command": "fbt.cmd",
    "args": ["-c"]
  },
  "problemMatcher": []
},

Key Changes Explained:

  • group object format: VS Code's task schema requires group to be an object with a kind property for proper task categorization
  • args array: Separated command and arguments for better cross-platform compatibility and proper shell escaping
  • windows property: Provides Windows-specific command (fbt.cmd) ensuring the tasks work on both Unix and Windows environments
  • problemMatcher: Added empty array to suppress VS Code warnings (can be enhanced with custom matchers if needed)
  • File ending: Ensure the file ends with a newline character

These changes ensure the tasks work correctly across all platforms and follow VS Code's task configuration best practices.

Wow, AI reviewing my simplest PR, cool

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.

2 participants