Skip to content

Commit

Permalink
CI上でのlintエラーを修正した (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty2501 authored May 15, 2022
1 parent e466c20 commit ffd69d3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 2 additions & 0 deletions crates/voicevox_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ pub enum Error {
* エラーメッセージのベースとなる文字列は必ずbase_error_message関数を使用してVoicevoxResultCodeのエラー出力の内容と対応するようにすること
*/
#[error("{}", base_error_message(VOICEVOX_RESULT_NOT_LOADED_OPENJTALK_DICT))]
// TODO:仮実装がlinterエラーにならないようにするための属性なのでこのenumが正式に使われる際にallow(dead_code)を取り除くこと
#[allow(dead_code)]
NotLoadedOpenjtalkDict,
}

Expand Down
24 changes: 22 additions & 2 deletions crates/voicevox_core/src/internal.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
use super::*;
use c_export::VoicevoxResultCode;
use std::ffi::CStr;
use std::os::raw::{c_char, c_int};
use std::path::Path;
use std::os::raw::c_int;

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
pub fn initialize(use_gpu: bool, cpu_num_threads: usize, load_all_models: bool) -> Result<()> {
unimplemented!()
}

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
pub fn load_model(speaker_id: i64) -> Result<()> {
unimplemented!()
}

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
pub fn is_model_loaded(speaker_id: i64) -> bool {
unimplemented!()
}
Expand All @@ -28,6 +33,8 @@ pub fn supported_devices() -> &'static CStr {
unimplemented!()
}

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
pub fn yukarin_s_forward(
length: i64,
phoneme_list: *const i64,
Expand All @@ -37,6 +44,8 @@ pub fn yukarin_s_forward(
unimplemented!()
}

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
#[allow(clippy::too_many_arguments)]
pub fn yukarin_sa_forward(
length: i64,
Expand All @@ -52,6 +61,8 @@ pub fn yukarin_sa_forward(
unimplemented!()
}

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
pub fn decode_forward(
length: i64,
phoneme_size: i64,
Expand All @@ -63,9 +74,14 @@ pub fn decode_forward(
unimplemented!()
}

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
pub fn voicevox_load_openjtalk_dict(dict_path: &CStr) -> Result<()> {
unimplemented!()
}

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
pub fn voicevox_tts(
text: &CStr,
speaker_id: i64,
Expand All @@ -75,6 +91,8 @@ pub fn voicevox_tts(
unimplemented!()
}

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
pub fn voicevox_tts_from_kana(
text: &CStr,
speaker_id: i64,
Expand All @@ -84,6 +102,8 @@ pub fn voicevox_tts_from_kana(
unimplemented!()
}

//TODO:仮実装がlinterエラーにならないようにするための属性なのでこの関数を正式に実装する際にallow(unused_variables)を取り除くこと
#[allow(unused_variables)]
pub fn voicevox_wav_free(wav: *mut u8) -> Result<()> {
unimplemented!()
}
Expand Down
2 changes: 0 additions & 2 deletions crates/voicevox_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ mod error;
mod internal;
mod result;

use derive_getters::Getters;
use derive_new::new;
use error::*;
use result::*;

0 comments on commit ffd69d3

Please sign in to comment.