Skip to content

Commit

Permalink
Add sonar excludes files.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunquakes committed May 21, 2024
1 parent b2febda commit 04e8d85
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'

function createWindow() {
const win = new BrowserWindow({
width: 1024,
height: 768,
minWidth: 1024,
minHeight: 768,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
Expand Down
5 changes: 1 addition & 4 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
sonar.organization=sunquakes
sonar.projectKey=sunquakes_electron-kits

sonar.issue.ignore.allfile=true
sonar.issue.ignore.multicriteria=e1
sonar.issue.ignore.multicriteria.e1.ruleKey=common-detection:DuplicatedBlocks
sonar.issue.ignore.multicriteria.e1.resourceKey=src/lang/**.js
sonar.exclusions=src/lang/**.js
2 changes: 1 addition & 1 deletion src/components/User.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const formState = reactive({
const initPagination: Pagination = {
current: 1,
pageSize: 1
pageSize: 5
}
const pagination = reactive({ ...initPagination })
Expand Down
12 changes: 5 additions & 7 deletions src/components/layout/Header.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<template>
<a-layout-header style="background: #fff; padding: 0">
<a-page-header
title="Title"
:title="nickname"
class="site-page-header"
sub-title="This is a subtitle"
:avatar="{ src: 'https://avatars1.githubusercontent.com/u/8186664?s=460&v=4' }"
>
<template #tags>
<a-tag color="blue">Running</a-tag>
<a-tag color="green">online</a-tag>
</template>
<template #extra>
<a-button key="3">Operation</a-button>
<a-button key="2">Operation</a-button>
<a-select v-model:value="locale" style="width: 90px" :options="langOptions"></a-select>
<a-dropdown key="more">
<a-button :style="{ border: 'none', padding: 0 }">
Expand All @@ -33,7 +30,7 @@
<script lang="ts" setup>
import { EllipsisOutlined, ExclamationCircleOutlined } from '@ant-design/icons-vue'
import type { SelectProps } from 'ant-design-vue'
import { ref, h } from 'vue'
import { ref, h, reactive } from 'vue'
import { useI18n } from 'vue-i18n'
import { useStore } from 'vuex'
import { useRouter } from 'vue-router'
Expand All @@ -44,6 +41,8 @@ const router = useRouter()
const store = useStore()
const [modal, contextHolder] = Modal.useModal()
const nickname = reactive<string>(store.getters.user?.nickname)
const langOptions = ref<SelectProps['options']>([
{
value: 'en',
Expand All @@ -56,7 +55,6 @@ const langOptions = ref<SelectProps['options']>([
])
const logout = () => {
console.log(2)
modal.confirm({
title: t('logout.confirm'),
icon: h(ExclamationCircleOutlined),
Expand Down

0 comments on commit 04e8d85

Please sign in to comment.