[WIP] Add syntax check for rust and C\C++ code (#108)
* proof of concept * fix syntax for rust and add auto fix syntax * fix syntax for C * fix bug with files owner * add information to wiki * try to add ci * format code from master * even more format fixes * change docker to docker-compose * Exclude ./target_*/build directories from format check * Run rustfmt only on project files * add ulimit setup for long clang list * merge * fix rustfmt, exclude target Inc directory * sync with master * abspath Co-authored-by: aanper <mail@s3f.ru> Co-authored-by: Vadim Kaushan <admin@disasm.info>
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
#![no_std]
|
||||
|
||||
#[cfg(target_arch = "arm")]
|
||||
use flipper_f1_sys::hal::{HAL_UART_Transmit_IT, huart1};
|
||||
use flipper_f1_sys::hal::{huart1, HAL_UART_Transmit_IT};
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn add(a: u32, b: u32) -> u32 {
|
||||
a + b
|
||||
}
|
||||
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn rust_uart_write() {
|
||||
let string = "Rust test string\n";
|
||||
@@ -28,12 +27,13 @@ pub extern "C" fn rust_uart_write() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mod aux {
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(_info: &PanicInfo) -> ! {
|
||||
loop { continue }
|
||||
loop {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user