最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - Spotless plugin required for NPM tasks - Stack Overflow

programmeradmin1浏览0评论

The build.gradle contains tasks for java like spotlessApply and some for the node build. For some reason the gitlab pipeline complains that spotlessApply has no explicit reference from or two the node tasks:

Some problems were found with the configuration of task ':frontend:spotlessJava' (type 'SpotlessTaskImpl').
  - Gradle detected a problem with the following location: '/builds/frontend'.
    
    Reason: Task ':frontend:spotlessJava' uses this output of task ':frontend:nodeSetup' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':frontend:nodeSetup' as an input of ':frontend:spotlessJava'.
      2. Declare an explicit dependency on ':frontend:nodeSetup' from ':frontend:spotlessJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':frontend:nodeSetup' from ':frontend:spotlessJava' using Task#mustRunAfter.

All three solutions don't make sense, as there is no java code involved with node - we use eslint for the TypeScript - this doesn't make sense.

Any idea how we could prevent this? I don't want to confuse future developers by doing one of the solutions only to make the gitlab pipeline happy.

发布评论

评论列表(0)

  1. 暂无评论