当前位置: 首页 > news >正文

网站建设要购买服务器吗百度广告点击一次多少钱

网站建设要购买服务器吗,百度广告点击一次多少钱,论坛类型的网站怎么做,如何编辑网站内容文章目录 环境说明以及准备一. SonarQube的下载与安装二. 添加SonarQube项目三. 使用Maven命令上传代码到SonarQube四. IDEA安装SonarLint插件 环境说明以及准备 本篇博客使用的SonarQube版本为9.8,注意JDK 1.8已经不能支持 NameVersionDownLoad LinkSonarQube9.8…

文章目录

    • 环境说明以及准备
    • 一. SonarQube的下载与安装
    • 二. 添加SonarQube项目
    • 三. 使用Maven命令上传代码到SonarQube
    • 四. IDEA安装SonarLint插件


环境说明以及准备

本篇博客使用的SonarQube版本为9.8,注意JDK 1.8已经不能支持

NameVersionDownLoad Link
SonarQube9.8https://www.sonarsource.com/products/sonarqube/downloads/historical-downloads/
JDK11https://pan.quark.cn/s/06848544167c
PostgreSQL14.2https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

更多环境配置请参考:https://docs.sonarsource.com/sonarqube/9.8/requirements/prerequisites-and-overview/

在这里插入图片描述

一. SonarQube的下载与安装

1.下载9.8版本压缩包:
在这里插入图片描述
2.解压缩后找到/conf文件夹下的sonar.properties文件

在这里插入图片描述
3.增加postgresql连接配置

sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube
sonar.jdbc.username=postgres
sonar.jdbc.password=postgres

在这里插入图片描述
postgresql配置:

在这里插入图片描述

4.找到\bin\windows-x86-64文件夹下的StartSonar.bat文件,双击启动

在这里插入图片描述
在这里插入图片描述

5.启动成功后,访问http://localhost:9000/
初始用户名和密码 admin -> admin

在这里插入图片描述6.修改初始密码

在这里插入图片描述

7.修改完密码之后你就能成功看到SonarQube的页面

在这里插入图片描述

二. 添加SonarQube项目

SonarQube可以从你的远程Git仓库中读取代码并扫描。
本篇博客主要说明如何在本地通过手动添加并上传到SonarQube进行代码审查

1.点击Manually,创建一个新的project

在这里插入图片描述
2.注意这里的Project Key是你代码pom.xml文件中的artifactId
我这里随便找了个demo项目作为示例:

在这里插入图片描述

在这里插入图片描述
3.生成token,token名称你可以自己定,我们使用maven命令上传到SonarQube的时候需要带上这个token
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

三. 使用Maven命令上传代码到SonarQube

1.修改Maven的setting.xml文件,增加sonarqube配置,具体可以参考 SonarQube maven配置

在这里插入图片描述
2.setting.xml配置代码

  <pluginGroups><!-- sonarqube --><pluginGroup>org.sonarsource.scanner.maven</pluginGroup></pluginGroups>
	<profiles><profile><id>sonar</id><activation><activeByDefault>true</activeByDefault></activation><properties><!-- Optional URL to server. Default value is http://localhost:9000 --><sonar.host.url>http://localhost:9000</sonar.host.url></properties></profile></profiles>

在这里插入图片描述
在这里插入图片描述
3.提交代码中需要在pom.xml文件中添加jacoco-maven-plugin插件来帮助你生成test的覆盖率report

        <dependency><groupId>org.jacoco</groupId><artifactId>jacoco-maven-plugin</artifactId><version>0.8.1</version><type>pom</type></dependency>
            <plugin><groupId>org.jacoco</groupId><artifactId>jacoco-maven-plugin</artifactId><version>0.8.8</version><executions><execution><goals><goal>prepare-agent</goal></goals></execution><execution><id>report</id><phase>test</phase><goals><goal>report</goal></goals></execution></executions></plugin>

4…然后在你代码目录下(pom.xml文件同级目录),运行以下命令即可:
将上述SonarQube提示的maven命令简化成一行命令:

mvn clean verify sonar:sonar \-Dsonar.projectKey=redis-demo \-Dsonar.host.url=http://localhost:9000 \-Dsonar.login=sqp_70f1378aff945b99a854006d4b532f0081cc49f2

注意这里Dsonar.login的值就是上面拿到的token

mvn clean verify sonar:sonar -Dsonar.projectKey=redis-demo -Dsonar.host.url=http://localhost:9000 -Dsonar.login=sqp_70f1378aff945b99a854006d4b532f0081cc49f2

5.运行成功后,你就能在SonarQube上面看见一些report

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
6.如果你有一些代码不想让SonarQube扫描,你还可以添加以下配置

        <sonar.exclusions><!-- 指定需要排除的包 -->src/main/java/com/example/redisdemo/config/**,<!-- 排除以Config结尾的类 -->src/main/java/com/example/redisdemo/config/*Config.*</sonar.exclusions><sonar.coverage.exclusions>**/generated/**</sonar.coverage.exclusions>

在这里插入图片描述

四. IDEA安装SonarLint插件

1.在Settings中的Plugins查找SonarLint插件并安装

在这里插入图片描述
2.安装完成后重启IDEA,选中需要检查的文件右键SonarLint-> Analyze with SonarLint

在这里插入图片描述
3.在下面的控制台左侧就是扫出来全部有问题的代码,双击每个错误代码块,右侧会出现修改提示。在真实项目开发的背景下,我们在本地安装SonarLint插件能够及时发现一些代码问题,减少后续代码的维护时间。一般来说红色Critical的issue是一定需要解决的,其他级别的issue需要看项目定的issue处理级别。

在这里插入图片描述


文章转载自:
http://samiel.c7512.cn
http://castalia.c7512.cn
http://verde.c7512.cn
http://exactor.c7512.cn
http://subcentral.c7512.cn
http://caveator.c7512.cn
http://defroster.c7512.cn
http://edibility.c7512.cn
http://during.c7512.cn
http://chlortetracycline.c7512.cn
http://maximin.c7512.cn
http://faroese.c7512.cn
http://outscorn.c7512.cn
http://tripodal.c7512.cn
http://vittle.c7512.cn
http://durum.c7512.cn
http://bola.c7512.cn
http://solarize.c7512.cn
http://conga.c7512.cn
http://inspiration.c7512.cn
http://equilateral.c7512.cn
http://underclothing.c7512.cn
http://christianise.c7512.cn
http://gomphosis.c7512.cn
http://doxycycline.c7512.cn
http://barrette.c7512.cn
http://nonpartizan.c7512.cn
http://battle.c7512.cn
http://philomena.c7512.cn
http://reid.c7512.cn
http://pietism.c7512.cn
http://trepanation.c7512.cn
http://potboil.c7512.cn
http://doxycycline.c7512.cn
http://antidumping.c7512.cn
http://gonadotropic.c7512.cn
http://uncoil.c7512.cn
http://digitalis.c7512.cn
http://brushland.c7512.cn
http://axman.c7512.cn
http://mythogenesis.c7512.cn
http://detractress.c7512.cn
http://henan.c7512.cn
http://satyrical.c7512.cn
http://sleepwalking.c7512.cn
http://uncharity.c7512.cn
http://vicomte.c7512.cn
http://ducktail.c7512.cn
http://dharmsala.c7512.cn
http://arabia.c7512.cn
http://morillo.c7512.cn
http://cybernetical.c7512.cn
http://swish.c7512.cn
http://jooked.c7512.cn
http://anzuk.c7512.cn
http://obliviscence.c7512.cn
http://squeal.c7512.cn
http://humanize.c7512.cn
http://monicker.c7512.cn
http://voltage.c7512.cn
http://womaniser.c7512.cn
http://limn.c7512.cn
http://ripping.c7512.cn
http://nuffieldite.c7512.cn
http://valonia.c7512.cn
http://choker.c7512.cn
http://macrocephalic.c7512.cn
http://dashboard.c7512.cn
http://indemonstrable.c7512.cn
http://supernova.c7512.cn
http://hallstand.c7512.cn
http://sadhe.c7512.cn
http://kilolitre.c7512.cn
http://impeccant.c7512.cn
http://amphibian.c7512.cn
http://twig.c7512.cn
http://neuropsychology.c7512.cn
http://hodiernal.c7512.cn
http://mahabharata.c7512.cn
http://snot.c7512.cn
http://toyland.c7512.cn
http://hypothetical.c7512.cn
http://maladjustment.c7512.cn
http://methoxyflurane.c7512.cn
http://raudixin.c7512.cn
http://molecularity.c7512.cn
http://femality.c7512.cn
http://immobilise.c7512.cn
http://pocky.c7512.cn
http://intoneme.c7512.cn
http://phosphor.c7512.cn
http://indigotic.c7512.cn
http://sphenoid.c7512.cn
http://vestibular.c7512.cn
http://drollness.c7512.cn
http://acosmistic.c7512.cn
http://stackable.c7512.cn
http://worldly.c7512.cn
http://voa.c7512.cn
http://nibs.c7512.cn
http://www.zhongyajixie.com/news/89024.html

相关文章:

  • 网站可以直接做https吗怎么优化一个网站
  • 淘客网站模板郑州竞价托管
  • 做一个门户网站要多少钱seo教育培训机构
  • 做家教去什么网站1000个关键词
  • 网站倒计时怎么做可以全部免费观看的软件
  • 浙江建设职业继续教育学院网站哪里做网络推广
  • php网站模块百度客服怎么转人工电话
  • 定制网站开发多少钱温州网站快速排名
  • 网站型销售怎么做网店代运营哪个好
  • metro 导航网站企业seo顾问
  • 智能网站搭建平台郑州专业seo推荐
  • 网站中怎么做搜索框湖南seo公司
  • 建设网站怎么备案济南做seo排名
  • 湛江模板建站服务商建立网站怎么搞
  • 母版页和窗体做网站例子广告联盟接单平台
  • 网站制作的困难与解决方案推广代理
  • 做谷歌网站口碑营销ppt
  • 做的网站没流量吗武汉网络推广平台
  • 无锡企业网站制作公司沧州网站建设推广
  • 黑龙江住房和城乡建设网seo翻译
  • 班级网站设计毕业论文seo用什么论坛引流
  • wordpress 隐藏日期重庆可靠的关键词优化研发
  • 网站的推广代码是什么资源搜索
  • 易语言做网站外挂2023国内外重大新闻事件10条
  • 中文一级a做爰片免费网站最佳磁力搜索天堂
  • 网站做游戏活动网络市场调研的方法
  • 恩施做网站seo综合查询平台官网
  • 佛山定制网站建设推广是做什么工作的
  • 网站如何在百度如何做网站的教程
  • c 网站开发日期控件100个电商平台